|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.distcache.DistCacheEntry
public class DistCacheEntry
An entry in the cache map
| Constructor Summary | |
|---|---|
DistCacheEntry(CacheStoreManager engine,
java.lang.Object key,
HashKey keyHash,
TriadOwner owner)
|
|
DistCacheEntry(CacheStoreManager engine,
java.lang.Object key,
HashKey keyHash,
TriadOwner owner,
CacheConfig config)
|
|
| Method Summary | |
|---|---|
void |
addLoadCount()
|
void |
clearLease()
|
HashKey |
compareAndPut(HashKey testValue,
java.lang.Object value,
CacheConfig config)
Sets the current value |
boolean |
compareAndPut(long version,
HashKey value,
long valueLength,
CacheConfig config)
Sets the current value |
boolean |
compareAndSet(MnodeEntry oldMnodeValue,
MnodeEntry mnodeValue)
Sets the current value. |
void |
finishReadUpdate()
Completes an update of a cache item. |
java.lang.Object |
get(CacheConfig config)
Returns the object for the given key, checking the backing if necessary. |
long |
getAccessedExpireTimeout()
Returns the idle timeout |
java.lang.Object |
getAndPut(java.lang.Object value,
CacheConfig config)
Sets the current value |
HashKey |
getCacheHash()
Returns the cacheHash |
long |
getCost()
|
long |
getCreationTime()
|
java.lang.Object |
getExact(CacheConfig config)
Returns the object for the given key, checking the backing if necessary. |
long |
getExpirationTime()
|
int |
getHits()
|
java.lang.Object |
getKey()
Returns the key for this entry in the Cache. |
HashKey |
getKeyHash()
Returns the keyHash |
long |
getLastAccessedTime()
|
long |
getLastModifiedTime()
Returns the last update time. |
int |
getLeaseOwner()
Returns the lease owner |
long |
getLeaseTimeout()
Returns the lease timeout |
int |
getLoadCount()
Returns the load count. |
MnodeEntry |
getMnodeEntry()
Returns the value section of the entry. |
MnodeEntry |
getMnodeValue(CacheConfig config)
Returns the object for the given key, checking the backing if necessary |
long |
getModifiedExpireTimeout()
Returns the expire timeout. |
TriadOwner |
getOwner()
Returns the owner |
boolean |
getStream(java.io.OutputStream os,
CacheConfig config)
Fills the value with a stream |
int |
getUserFlags()
|
java.lang.Object |
getValue()
Returns the value of the cache entry. |
HashKey |
getValueHash(java.lang.Object value,
CacheConfig config)
|
byte[] |
getValueHashArray()
|
HashKey |
getValueHashKey()
Returns the value key |
long |
getValueLength()
Returns the value length |
long |
getVersion()
|
boolean |
isExpired(long now)
Returns true when the entry is expired. |
boolean |
isValid()
|
boolean |
isValueNull()
Returns true if the value is null. |
java.lang.Object |
peek()
Peeks the current value without checking the backing store. |
ExtCacheEntry |
put(java.io.InputStream is,
CacheConfig config,
long accessedExpireTimeout,
long modifiedExpireTimeout)
Sets the value by an input stream |
ExtCacheEntry |
put(java.io.InputStream is,
CacheConfig config,
long accessedExpireTimeout,
long modifiedExpireTimeout,
int flags)
Sets the value by an input stream |
void |
put(java.lang.Object value,
CacheConfig config)
Sets the current value |
boolean |
remove(CacheConfig config)
Remove the value |
java.lang.Object |
setValue(java.lang.Object value)
|
boolean |
startReadUpdate()
Conditionally starts an update of a cache item, allowing only a single thread to update the data. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DistCacheEntry(CacheStoreManager engine,
java.lang.Object key,
HashKey keyHash,
TriadOwner owner)
public DistCacheEntry(CacheStoreManager engine,
java.lang.Object key,
HashKey keyHash,
TriadOwner owner,
CacheConfig config)
| Method Detail |
|---|
public final java.lang.Object getKey()
getKey in interface Cache.Entrypublic final HashKey getKeyHash()
getKeyHash in interface ExtCacheEntrypublic java.lang.Object getValue()
getValue in interface ExtCacheEntrygetValue in interface Cache.Entrypublic boolean isValueNull()
isValueNull in interface ExtCacheEntrypublic final HashKey getCacheHash()
public final int getUserFlags()
getUserFlags in interface ExtCacheEntrypublic final TriadOwner getOwner()
public final MnodeEntry getMnodeEntry()
public java.lang.Object peek()
public java.lang.Object get(CacheConfig config)
public java.lang.Object getExact(CacheConfig config)
public MnodeEntry getMnodeValue(CacheConfig config)
public boolean getStream(java.io.OutputStream os,
CacheConfig config)
throws java.io.IOException
java.io.IOException
public HashKey getValueHash(java.lang.Object value,
CacheConfig config)
public void put(java.lang.Object value,
CacheConfig config)
public ExtCacheEntry put(java.io.InputStream is,
CacheConfig config,
long accessedExpireTimeout,
long modifiedExpireTimeout)
throws java.io.IOException
java.io.IOException
public ExtCacheEntry put(java.io.InputStream is,
CacheConfig config,
long accessedExpireTimeout,
long modifiedExpireTimeout,
int flags)
throws java.io.IOException
java.io.IOException
public java.lang.Object getAndPut(java.lang.Object value,
CacheConfig config)
public HashKey compareAndPut(HashKey testValue,
java.lang.Object value,
CacheConfig config)
public boolean compareAndPut(long version,
HashKey value,
long valueLength,
CacheConfig config)
public boolean remove(CacheConfig config)
public final boolean startReadUpdate()
public final void finishReadUpdate()
public final boolean compareAndSet(MnodeEntry oldMnodeValue,
MnodeEntry mnodeValue)
public HashKey getValueHashKey()
ExtCacheEntry
getValueHashKey in interface ExtCacheEntrypublic byte[] getValueHashArray()
public long getValueLength()
ExtCacheEntry
getValueLength in interface ExtCacheEntrypublic long getAccessedExpireTimeout()
ExtCacheEntry
getAccessedExpireTimeout in interface ExtCacheEntrypublic long getModifiedExpireTimeout()
ExtCacheEntry
getModifiedExpireTimeout in interface ExtCacheEntrypublic boolean isExpired(long now)
ExtCacheEntry
isExpired in interface ExtCacheEntrypublic long getLeaseTimeout()
ExtCacheEntry
getLeaseTimeout in interface ExtCacheEntrypublic int getLeaseOwner()
ExtCacheEntry
getLeaseOwner in interface ExtCacheEntrypublic void clearLease()
public long getCost()
public long getCreationTime()
public long getExpirationTime()
public int getHits()
public long getLastAccessedTime()
getLastAccessedTime in interface ExtCacheEntrypublic long getLastModifiedTime()
ExtCacheEntry
getLastModifiedTime in interface ExtCacheEntrypublic long getVersion()
getVersion in interface ExtCacheEntrypublic boolean isValid()
isValid in interface ExtCacheEntrypublic java.lang.Object setValue(java.lang.Object value)
public void addLoadCount()
public int getLoadCount()
ExtCacheEntry
getLoadCount in interface ExtCacheEntrypublic 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 | |||||||||