|
||||||||||
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 |
isClosed()
|
boolean |
isDataAvailable(long id)
Checks if we have the data |
boolean |
load(long id,
WriteStream os)
Reads the object from the data store. |
java.sql.Blob |
loadBlob(long id)
Reads the object from the data store. |
java.io.InputStream |
openInputStream(long id)
Reads the object from the data store. |
boolean |
remove(long id)
Removes the data, returning true on success |
void |
removeOrphanListener(MnodeOrphanListener listener)
|
long |
save(java.io.InputStream is,
int length)
Saves the data, returning true on success. |
long |
save(StreamSource source,
int length)
Saves the data, returning true on success. |
java.lang.String |
toString()
|
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.Exception
public void addOrphanListener(MnodeOrphanListener listener)
public void removeOrphanListener(MnodeOrphanListener listener)
public boolean load(long id, WriteStream os)
id
- the hash identifier for the dataos
- the WriteStream to hold the data
public java.sql.Blob loadBlob(long id)
id
- the hash identifier for the dataos
- the WriteStream to hold the data
public boolean isDataAvailable(long id)
id
- the hash identifier for the data
public java.io.InputStream openInputStream(long id)
id
- the hash identifier for the dataos
- the WriteStream to hold the data
public long save(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 long save(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.IOException
public boolean remove(long id)
id
- the data's unique id.public void validateDatabase()
public long getCount()
public boolean isClosed()
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 |