|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.cluster.FileBacking
public class FileBacking
Manages the backing for the file objectStore.
| Constructor Summary | |
|---|---|
FileBacking()
|
|
FileBacking(java.lang.String name)
|
|
| Method Summary | |
|---|---|
void |
clearOldObjects(long maxIdleTime)
Clears the old objects. |
void |
destroy()
|
javax.sql.DataSource |
getDataSource()
Returns the data source. |
long |
getObjectCount()
|
Path |
getPath()
Returns the path to the directory. |
boolean |
init(int clusterLength)
|
boolean |
load(ClusterObject clusterObj,
java.lang.Object obj)
Load the session from the jdbc objectStore. |
boolean |
loadIfVersion(ClusterObject clusterObj,
java.lang.Object obj)
Load the session from the jdbc objectStore. |
byte[] |
read(HashKey id,
WriteStream os)
Reads from the objectStore. |
void |
remove(HashKey id)
Removes the named object from the objectStore. |
java.lang.String |
serverNameToTableName(java.lang.String serverName)
|
void |
setExpireInterval(HashKey id,
long expireInterval)
Sets the object's expire_interval. |
void |
setPath(Path path)
Sets the path to the saved file. |
void |
setTableName(java.lang.String table)
Sets the table name |
long |
start()
|
void |
store(HashKey id,
HashKey storeId,
java.io.InputStream is,
int length,
byte[] dataHash,
byte[] oldDataHash,
long expireInterval,
int primary,
int secondary,
int tertiary)
Stores the cluster object on the local objectStore. |
boolean |
storeData(HashKey id,
byte[] dataHash,
java.io.InputStream is,
int length)
Stores the cluster object on the local objectStore using an updateImpl query. |
java.lang.String |
toString()
|
void |
updateAccess(HashKey id)
Updates the object's objectAccess time. |
boolean |
updateMetadata(HashKey id,
HashKey storeId,
byte[] dataHash,
long expireInterval,
int primary,
int secondary,
int tertiary,
boolean isDead)
Updates the metadata from a cluster peer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileBacking()
public FileBacking(java.lang.String name)
| Method Detail |
|---|
public Path getPath()
public void setPath(Path path)
public void setTableName(java.lang.String table)
public boolean init(int clusterLength)
throws java.lang.Exception
java.lang.Exceptionpublic javax.sql.DataSource getDataSource()
public long start()
throws java.lang.Exception
java.lang.Exception
public void clearOldObjects(long maxIdleTime)
throws java.sql.SQLException
java.sql.SQLException
public boolean load(ClusterObject clusterObj,
java.lang.Object obj)
throws java.lang.Exception
session - the session to fill.
java.lang.Exception
public boolean loadIfVersion(ClusterObject clusterObj,
java.lang.Object obj)
throws java.lang.Exception
session - the session to fill.
java.lang.Exception
public void updateAccess(HashKey id)
throws java.lang.Exception
obj - the object to objectStore.
java.lang.Exception
public void setExpireInterval(HashKey id,
long expireInterval)
throws java.lang.Exception
obj - the object to objectStore.
java.lang.Exception
public void remove(HashKey id)
throws java.lang.Exception
java.lang.Exception
public byte[] read(HashKey id,
WriteStream os)
throws java.io.IOException
java.io.IOException
public void store(HashKey id,
HashKey storeId,
java.io.InputStream is,
int length,
byte[] dataHash,
byte[] oldDataHash,
long expireInterval,
int primary,
int secondary,
int tertiary)
id - the object's unique id.is - the input stream to the serialized objectlength - the length object the serialized objectexpireInterval - how long the object lives w/o objectAccess
public boolean storeData(HashKey id,
byte[] dataHash,
java.io.InputStream is,
int length)
conn - the database connectionid - the object's unique id.is - the input stream to the serialized objectlength - the length object the serialized object
public boolean updateMetadata(HashKey id,
HashKey storeId,
byte[] dataHash,
long expireInterval,
int primary,
int secondary,
int tertiary,
boolean isDead)
id - the object's unique id.expireInterval - how long the object lives w/o objectAccess
public long getObjectCount()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void destroy()
public java.lang.String serverNameToTableName(java.lang.String serverName)
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||