|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.distcache.CacheStoreManager
@Module public final class CacheStoreManager
Manages the distributed cache
| Nested Class Summary | |
|---|---|
static class |
CacheStoreManager.DataItem
|
| Constructor Summary | |
|---|---|
CacheStoreManager(ResinSystem resinSystem)
|
|
| Method Summary | |
|---|---|
void |
addCacheListener(HashKey cacheKey,
CacheMnodeListener listener)
|
byte[] |
calculateValueHash(java.lang.Object value,
CacheConfig config)
Used by QA |
void |
clearEphemeralEntries()
Clears ephemeral data on startup. |
void |
clearLeases()
Clears leases on server start/stop |
void |
close()
Closes the manager. |
void |
closeCache(java.lang.String guid)
|
protected HashKey |
compareAndPut(DistCacheEntry entry,
HashKey testValue,
MnodeUpdate mnodeUpdate,
java.lang.Object value,
CacheConfig config)
|
HashKey |
compareAndPut(DistCacheEntry entry,
HashKey testValue,
java.lang.Object value,
CacheConfig config)
|
boolean |
compareAndPut(DistCacheEntry entry,
long version,
HashKey valueHash,
long valueLength,
CacheConfig config)
|
HashKey |
compareAndPutLocal(DistCacheEntry entry,
HashKey testValue,
MnodeUpdate mnodeUpdate,
java.lang.Object value,
long leaseTimeout,
int leaseOwner)
|
DistCacheEntry |
createCacheEntry(java.lang.Object key,
HashKey hashKey)
Returns the key entry. |
protected HashKey |
createHashKey(java.lang.Object key,
CacheConfig config)
|
protected HashKey |
createHashKeyImpl(java.lang.Object key,
CacheConfig config)
Returns the key hash |
HashKey |
createSelfHashKey(java.lang.Object key,
CacheSerializer keySerializer)
Returns the key hash |
void |
destroyCache(CacheImpl cache)
Called when a cache is removed. |
java.lang.Object |
get(DistCacheEntry entry,
CacheConfig config,
long now)
|
java.lang.Object |
get(DistCacheEntry entry,
CacheConfig config,
long now,
boolean isExact)
|
protected HashKey |
getAndPut(DistCacheEntry entry,
MnodeUpdate mnodeUpdate,
java.lang.Object value,
long leaseTimeout,
int leaseOwner,
CacheConfig config)
Sets a cache entry |
java.lang.Object |
getAndPut(DistCacheEntry entry,
java.lang.Object value,
CacheConfig config)
Sets a cache entry |
protected java.lang.Object |
getAndPut(DistCacheEntry entry,
java.lang.Object value,
CacheConfig config,
long now,
MnodeEntry mnodeValue)
Sets a cache entry |
HashKey |
getAndPutLocal(DistCacheEntry entry,
MnodeUpdate mnodeUpdate,
java.lang.Object value,
long leaseTimeout,
int leaseOwner)
|
CacheEngine |
getCacheEngine()
|
DistCacheEntry |
getCacheEntry(HashKey hashKey)
Returns the key entry. |
DistCacheEntry |
getCacheEntry(HashKey hashKey,
CacheConfig config)
Returns the key entry. |
DistCacheEntry |
getCacheEntry(java.lang.Object key,
CacheConfig config)
Returns the key entry. |
CacheDataBacking |
getDataBacking()
|
DataStore |
getDataStore()
|
java.lang.Object |
getExact(DistCacheEntry entry,
CacheConfig config,
long now)
|
DistCacheEntry |
getLocalEntryAndUpdateIdle(HashKey key)
|
MnodeStore |
getMnodeStore()
|
MnodeEntry |
getMnodeValue(DistCacheEntry entry,
CacheConfig config,
long now)
|
MnodeEntry |
getMnodeValue(DistCacheEntry entry,
CacheConfig config,
long now,
boolean isExact)
|
boolean |
getStream(DistCacheEntry entry,
java.io.OutputStream os,
CacheConfig config)
Gets a cache entry as a stream |
CacheStoreManager.DataItem |
getValueHash(java.lang.Object value,
CacheConfig config)
|
void |
initCache(CacheImpl cache)
Called when a cache initializes. |
boolean |
isClosed()
|
protected boolean |
isLocalExpired(CacheConfig config,
HashKey key,
MnodeEntry mnodeValue,
long now)
|
protected void |
lazyValueUpdate(DistCacheEntry entry,
CacheConfig config)
|
protected boolean |
loadClusterData(HashKey valueKey,
CacheConfig config)
Load the cluster data from the triad. |
DistCacheEntry |
loadLocalEntry(HashKey key)
|
MnodeEntry |
loadMnodeValue(DistCacheEntry cacheEntry)
Gets a cache entry |
void |
put(DistCacheEntry entry,
java.lang.Object value,
CacheConfig config)
Sets a cache entry |
protected void |
put(DistCacheEntry entry,
java.lang.Object value,
CacheConfig config,
long now,
MnodeEntry mnodeValue)
Sets a cache entry |
ExtCacheEntry |
put(HashKey hashKey,
java.io.InputStream is,
CacheConfig config,
long idleTimeout)
Sets a cache entry |
void |
put(HashKey hashKey,
java.lang.Object value,
CacheConfig config)
Sets a cache entry |
MnodeEntry |
putLocalValue(DistCacheEntry entry,
MnodeUpdate mnodeUpdate,
java.lang.Object value,
long leaseTimeout,
int leaseOwner)
Sets a cache entry |
ExtCacheEntry |
putStream(DistCacheEntry entry,
java.io.InputStream is,
CacheConfig config,
long accessedExpireTime,
long modifiedExpireTime,
int userFlags)
|
protected java.lang.Object |
readData(HashKey valueKey,
CacheSerializer serializer,
CacheConfig config)
|
protected boolean |
readData(MnodeEntry mnodeValue,
java.io.OutputStream os,
CacheConfig config)
|
boolean |
remove(DistCacheEntry entry,
CacheConfig config)
Sets a cache entry |
boolean |
remove(HashKey key,
CacheConfig config)
Sets a cache entry |
void |
saveLocalUpdateTime(HashKey key,
long version,
long accessTimeout,
long updateTime)
Sets a cache entry |
void |
setCacheEngine(CacheEngine cacheEngine)
|
void |
start()
|
java.lang.String |
toString()
|
protected void |
updateAccessTime(DistCacheEntry entry,
MnodeEntry mnodeValue)
|
CacheStoreManager.DataItem |
writeData(HashKey oldValueHash,
java.io.InputStream is)
|
CacheStoreManager.DataItem |
writeData(MnodeEntry mnodeValue,
java.lang.Object value,
CacheSerializer serializer)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CacheStoreManager(ResinSystem resinSystem)
| Method Detail |
|---|
public void setCacheEngine(CacheEngine cacheEngine)
public CacheEngine getCacheEngine()
public CacheDataBacking getDataBacking()
public void addCacheListener(HashKey cacheKey,
CacheMnodeListener listener)
public final DistCacheEntry getCacheEntry(java.lang.Object key,
CacheConfig config)
public final DistCacheEntry getCacheEntry(HashKey hashKey,
CacheConfig config)
public DistCacheEntry createCacheEntry(java.lang.Object key,
HashKey hashKey)
public final DistCacheEntry getCacheEntry(HashKey hashKey)
public final java.lang.Object get(DistCacheEntry entry,
CacheConfig config,
long now)
public final java.lang.Object getExact(DistCacheEntry entry,
CacheConfig config,
long now)
public final java.lang.Object get(DistCacheEntry entry,
CacheConfig config,
long now,
boolean isExact)
public final boolean getStream(DistCacheEntry entry,
java.io.OutputStream os,
CacheConfig config)
throws java.io.IOException
java.io.IOException
public final MnodeEntry getMnodeValue(DistCacheEntry entry,
CacheConfig config,
long now)
public final MnodeEntry getMnodeValue(DistCacheEntry entry,
CacheConfig config,
long now,
boolean isExact)
protected void lazyValueUpdate(DistCacheEntry entry,
CacheConfig config)
protected boolean isLocalExpired(CacheConfig config,
HashKey key,
MnodeEntry mnodeValue,
long now)
public CacheStoreManager.DataItem getValueHash(java.lang.Object value,
CacheConfig config)
public final void put(DistCacheEntry entry,
java.lang.Object value,
CacheConfig config)
protected final void put(DistCacheEntry entry,
java.lang.Object value,
CacheConfig config,
long now,
MnodeEntry mnodeValue)
public final ExtCacheEntry putStream(DistCacheEntry entry,
java.io.InputStream is,
CacheConfig config,
long accessedExpireTime,
long modifiedExpireTime,
int userFlags)
throws java.io.IOException
java.io.IOException
public final java.lang.Object getAndPut(DistCacheEntry entry,
java.lang.Object value,
CacheConfig config)
protected final java.lang.Object getAndPut(DistCacheEntry entry,
java.lang.Object value,
CacheConfig config,
long now,
MnodeEntry mnodeValue)
protected HashKey getAndPut(DistCacheEntry entry,
MnodeUpdate mnodeUpdate,
java.lang.Object value,
long leaseTimeout,
int leaseOwner,
CacheConfig config)
public HashKey getAndPutLocal(DistCacheEntry entry,
MnodeUpdate mnodeUpdate,
java.lang.Object value,
long leaseTimeout,
int leaseOwner)
public HashKey compareAndPut(DistCacheEntry entry,
HashKey testValue,
java.lang.Object value,
CacheConfig config)
protected HashKey compareAndPut(DistCacheEntry entry,
HashKey testValue,
MnodeUpdate mnodeUpdate,
java.lang.Object value,
CacheConfig config)
public final HashKey compareAndPutLocal(DistCacheEntry entry,
HashKey testValue,
MnodeUpdate mnodeUpdate,
java.lang.Object value,
long leaseTimeout,
int leaseOwner)
public boolean compareAndPut(DistCacheEntry entry,
long version,
HashKey valueHash,
long valueLength,
CacheConfig config)
public final DistCacheEntry loadLocalEntry(HashKey key)
public final DistCacheEntry getLocalEntryAndUpdateIdle(HashKey key)
protected final void updateAccessTime(DistCacheEntry entry,
MnodeEntry mnodeValue)
public final MnodeEntry loadMnodeValue(DistCacheEntry cacheEntry)
public final void saveLocalUpdateTime(HashKey key,
long version,
long accessTimeout,
long updateTime)
public final boolean remove(DistCacheEntry entry,
CacheConfig config)
public final boolean remove(HashKey key,
CacheConfig config)
public final MnodeEntry putLocalValue(DistCacheEntry entry,
MnodeUpdate mnodeUpdate,
java.lang.Object value,
long leaseTimeout,
int leaseOwner)
public final CacheStoreManager.DataItem writeData(MnodeEntry mnodeValue,
java.lang.Object value,
CacheSerializer serializer)
public final byte[] calculateValueHash(java.lang.Object value,
CacheConfig config)
public final CacheStoreManager.DataItem writeData(HashKey oldValueHash,
java.io.InputStream is)
throws java.io.IOException
java.io.IOException
protected final java.lang.Object readData(HashKey valueKey,
CacheSerializer serializer,
CacheConfig config)
protected final boolean readData(MnodeEntry mnodeValue,
java.io.OutputStream os,
CacheConfig config)
throws java.io.IOException
java.io.IOException
protected boolean loadClusterData(HashKey valueKey,
CacheConfig config)
public final void clearLeases()
public void clearEphemeralEntries()
public void start()
public void closeCache(java.lang.String guid)
protected HashKey createHashKey(java.lang.Object key,
CacheConfig config)
public void put(HashKey hashKey,
java.lang.Object value,
CacheConfig config)
public ExtCacheEntry put(HashKey hashKey,
java.io.InputStream is,
CacheConfig config,
long idleTimeout)
throws java.io.IOException
java.io.IOExceptionpublic void initCache(CacheImpl cache)
public void destroyCache(CacheImpl cache)
protected HashKey createHashKeyImpl(java.lang.Object key,
CacheConfig config)
public HashKey createSelfHashKey(java.lang.Object key,
CacheSerializer keySerializer)
public void close()
public boolean isClosed()
public MnodeStore getMnodeStore()
public DataStore getDataStore()
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 | |||||||||