|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.distcache.MnodeStore
com.caucho.distcache.jdbc.JdbcMnodeStore
public class JdbcMnodeStore
Manages backing for the cache map.
| Constructor Summary | |
|---|---|
JdbcMnodeStore(javax.sql.DataSource dataSource,
java.lang.String tableName,
java.lang.String serverName)
|
|
| Method Summary | |
|---|---|
void |
close()
|
void |
destroy()
|
long |
getCount()
|
javax.sql.DataSource |
getDataSource()
Returns the data source. |
java.util.ArrayList<CacheData> |
getGlobalUpdates(long updateTime,
int offset)
Returns the maximum update time on startup |
long |
getStartupLastUpdateTime()
Returns the max update time detected on startup. |
java.lang.String |
getTableName()
Returns the data source. |
java.util.ArrayList<CacheData> |
getUpdates(long updateTime,
int offset)
Returns the maximum update time on startup |
void |
handleAlarm(Alarm alarm)
Handles a callback from an alarm. |
void |
init()
|
protected void |
initDatabase()
Create the database, initializing if necessary. |
boolean |
insert(HashKey id,
MnodeValue mnodeUpdate)
Stores the data, returning true on success |
MnodeEntry |
load(HashKey id)
Reads the object from the data store. |
void |
removeExpiredData()
Clears the expired data |
java.lang.String |
toString()
|
boolean |
updateSave(byte[] keyHash,
MnodeValue mnodeUpdate)
Stores the data, returning true on success |
boolean |
updateUpdateTime(HashKey id,
long itemVersion,
long idleTimeout,
long updateTime)
Updates the update time, returning true on success |
| Methods inherited from class com.caucho.server.distcache.MnodeStore |
|---|
getStartupLastUpdateTime, getUpdates |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JdbcMnodeStore(javax.sql.DataSource dataSource,
java.lang.String tableName,
java.lang.String serverName)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
public javax.sql.DataSource getDataSource()
getDataSource in class MnodeStorepublic java.lang.String getTableName()
getTableName in class MnodeStorepublic long getStartupLastUpdateTime()
getStartupLastUpdateTime in class MnodeStore
public void init()
throws java.lang.Exception
init in class MnodeStorejava.lang.Exception
protected void initDatabase()
throws java.lang.Exception
initDatabase in class MnodeStorejava.lang.Exceptionpublic void close()
close in class MnodeStore
public java.util.ArrayList<CacheData> getUpdates(long updateTime,
int offset)
getUpdates in class MnodeStore
public java.util.ArrayList<CacheData> getGlobalUpdates(long updateTime,
int offset)
public MnodeEntry load(HashKey id)
load in class MnodeStoreid - the hash identifier for the data
public boolean insert(HashKey id,
MnodeValue mnodeUpdate)
insert in class MnodeStoreid - the key hashvalue - the value hashidleTimeout - the item's timeout
public boolean updateSave(byte[] keyHash,
MnodeValue mnodeUpdate)
updateSave in class MnodeStoreid - the key hashvalue - the value hashidleTimeout - the item's timeout
public boolean updateUpdateTime(HashKey id,
long itemVersion,
long idleTimeout,
long updateTime)
updateUpdateTime in class MnodeStoreid - the key hashitemVersion - the value versionidleTimeout - the item's timeoutupdateTime - the item's timeoutpublic void removeExpiredData()
removeExpiredData in class MnodeStorepublic long getCount()
getCount in class MnodeStorepublic void handleAlarm(Alarm alarm)
AlarmListener
handleAlarm in interface AlarmListenerhandleAlarm in class MnodeStorepublic void destroy()
destroy in class MnodeStorepublic java.lang.String toString()
toString in class MnodeStore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||