|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.distcache.DataStore
public class DataStore
Manages the backing for the file database objects
| Constructor Summary | |
|---|---|
DataStore(java.lang.String serverName,
MnodeStore mnodeStore)
|
|
| Method Summary | |
|---|---|
void |
addOrphanListener(MnodeOrphanListener listener)
|
void |
destroy()
|
long |
getCount()
|
protected void |
init()
|
boolean |
isDataAvailable(HashKey id)
Checks if we have the data |
boolean |
load(HashKey id,
LoadDataCallback cb)
Reads the object from the data store. |
boolean |
load(HashKey id,
WriteStream os)
Reads the object from the data store. |
java.sql.Blob |
loadBlob(HashKey id)
Reads the object from the data store. |
java.io.InputStream |
openInputStream(HashKey id)
Reads the object from the data store. |
void |
removeExpiredData()
Clears the expired data |
void |
removeOrphanListener(MnodeOrphanListener listener)
|
boolean |
save(HashKey id,
java.io.InputStream is,
int length)
Saves the data, returning true on success. |
boolean |
save(HashKey id,
StreamSource source,
int length)
Saves the data, returning true on success. |
java.lang.String |
toString()
|
boolean |
updateExpires(HashKey id)
Updates the expires time for the data. |
void |
validateDatabase()
Clears the expired data |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DataStore(java.lang.String serverName,
MnodeStore mnodeStore)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
protected void init()
throws java.lang.Exception
java.lang.Exceptionpublic void addOrphanListener(MnodeOrphanListener listener)
public void removeOrphanListener(MnodeOrphanListener listener)
public boolean load(HashKey id,
WriteStream os)
id - the hash identifier for the dataos - the WriteStream to hold the data
public java.sql.Blob loadBlob(HashKey id)
id - the hash identifier for the dataos - the WriteStream to hold the data
public boolean load(HashKey id,
LoadDataCallback cb)
id - the hash identifier for the dataos - the WriteStream to hold the data
public boolean isDataAvailable(HashKey id)
id - the hash identifier for the data
public java.io.InputStream openInputStream(HashKey id)
id - the hash identifier for the dataos - the WriteStream to hold the data
public boolean save(HashKey id,
StreamSource source,
int length)
throws java.io.IOException
id - the object's unique id.is - the input stream to the serialized objectlength - the length object the serialized object
java.io.IOException
public boolean save(HashKey id,
java.io.InputStream is,
int length)
throws java.io.IOException
id - the object's unique id.is - the input stream to the serialized objectlength - the length object the serialized object
java.io.IOExceptionpublic boolean updateExpires(HashKey id)
id - the hash identifier for the data
public void removeExpiredData()
public void validateDatabase()
public long getCount()
public void destroy()
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 | |||||||||