|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.distcache.MnodeStore
public class MnodeStore
Manages backing for the cache map.
| Constructor Summary | |
|---|---|
MnodeStore(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. |
long |
getStartupLastUpdateTime()
Returns the max update time detected on startup. |
long |
getStartupLastUpdateTime(HashKey cacheKey)
Returns the max update time detected on startup. |
java.lang.String |
getTableName()
Returns the data source. |
java.util.ArrayList<CacheData> |
getUpdates(HashKey cacheKey,
long updateTime,
int offset)
Returns the maximum update time on startup |
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. |
protected 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[] key,
MnodeValue mnodeUpdate)
Stores the data, returning true on success |
boolean |
updateUpdateTime(HashKey id,
long itemVersion,
long accessTimeout,
long updateTime)
Updates the update time, returning true on success |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MnodeStore(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()
public java.lang.String getTableName()
public long getStartupLastUpdateTime()
public long getStartupLastUpdateTime(HashKey cacheKey)
protected void init()
throws java.lang.Exception
java.lang.Exception
protected void initDatabase()
throws java.lang.Exception
java.lang.Exceptionpublic void close()
public java.util.ArrayList<CacheData> getUpdates(long updateTime,
int offset)
public java.util.ArrayList<CacheData> getUpdates(HashKey cacheKey,
long updateTime,
int offset)
public MnodeEntry load(HashKey id)
id - the hash identifier for the data
public boolean insert(HashKey id,
MnodeValue mnodeUpdate)
id - the key hashvalue - the value hashidleTimeout - the item's timeout
public boolean updateSave(byte[] key,
MnodeValue mnodeUpdate)
id - the key hashvalue - the value hashidleTimeout - the item's timeout
public boolean updateUpdateTime(HashKey id,
long itemVersion,
long accessTimeout,
long updateTime)
id - the key hashitemVersion - the value versionidleTimeout - the item's timeoutupdateTime - the item's timeoutpublic void removeExpiredData()
public long getCount()
public void handleAlarm(Alarm alarm)
AlarmListener
handleAlarm in interface AlarmListenerpublic 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 | |||||||||