|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.distcache.DataStore
com.caucho.distcache.jdbc.JdbcDataStore
public class JdbcDataStore
Manages the backing for the file database objects
| Constructor Summary | |
|---|---|
JdbcDataStore(JdbcMnodeStore mnodeStore,
java.lang.String tableName,
java.lang.String serverName)
|
|
| Method Summary | |
|---|---|
void |
addOrphanListener(MnodeOrphanListener listener)
|
void |
close()
|
void |
destroy()
|
long |
getCount()
|
void |
init()
|
boolean |
isDataAvailable(HashKey id)
Checks if we have the data |
boolean |
load(HashKey id,
CacheDataBacking dataBacking)
|
boolean |
load(HashKey id,
WriteStream os)
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)
|
void |
save(HashKey valueHash,
CacheDataBacking dataBacking)
|
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 com.caucho.server.distcache.DataStore |
|---|
load, loadBlob |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JdbcDataStore(JdbcMnodeStore mnodeStore,
java.lang.String tableName,
java.lang.String serverName)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
public void init()
throws java.lang.Exception
init in class DataStorejava.lang.Exceptionpublic void addOrphanListener(MnodeOrphanListener listener)
addOrphanListener in class DataStorepublic void removeOrphanListener(MnodeOrphanListener listener)
removeOrphanListener in class DataStore
public boolean load(HashKey id,
WriteStream os)
load in class DataStoreid - the hash identifier for the dataos - the WriteStream to hold the data
public boolean load(HashKey id,
CacheDataBacking dataBacking)
valueKey - dataBacking -
public boolean isDataAvailable(HashKey id)
isDataAvailable in class DataStoreid - the hash identifier for the data
public java.io.InputStream openInputStream(HashKey id)
openInputStream in class DataStoreid - 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
save in class DataStoreid - the object's unique id.is - the input stream to the serialized objectlength - the length object the serialized object
java.io.IOException
public void save(HashKey valueHash,
CacheDataBacking dataBacking)
valueHash - dataBacking -
public boolean save(HashKey id,
java.io.InputStream is,
int length)
throws java.io.IOException
save in class DataStoreid - 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)
updateExpires in class DataStoreid - the hash identifier for the data
public void removeExpiredData()
removeExpiredData in class DataStorepublic void validateDatabase()
validateDatabase in class DataStorepublic long getCount()
getCount in class DataStorepublic void close()
public void destroy()
destroy in class DataStorepublic java.lang.String toString()
toString in class DataStore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||