|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.distcache.MnodeValue
com.caucho.server.distcache.MnodeEntry
public final class MnodeEntry
An entry in the cache map
| Field Summary | |
|---|---|
static HashKey |
ANY_KEY
|
static MnodeEntry |
NULL
|
static HashKey |
NULL_KEY
|
| Constructor Summary | |
|---|---|
MnodeEntry(HashKey valueHash,
long valueLength,
long version,
java.lang.Object value,
HashKey cacheHash,
long flags,
long accessedExpireTimeout,
long modifiedExpireTimeout,
long leaseTimeout,
long lastAccessTime,
long lastUpdateTime,
boolean isServerVersionValid,
boolean isImplicitNull)
|
|
MnodeEntry(MnodeEntry oldMnodeValue,
long accessTimeout,
long lastUpdateTime)
|
|
MnodeEntry(MnodeValue mnodeValue,
java.lang.Object value,
long leaseTimeout,
long lastAccessTime,
long lastUpdateTime,
boolean isServerVersionValid,
boolean isImplicitNull)
|
|
| Method Summary | |
|---|---|
void |
clearLease()
Sets the owner |
int |
compareTo(MnodeEntry mnode)
Compares values |
long |
getAccessExpireTimeoutWindow()
Returns the idle window to avoid too many updates |
java.sql.Blob |
getBlob()
|
HashKey |
getCacheHashKey()
|
long |
getCreationTime()
|
long |
getExpirationTime()
Returns the expiration time |
int |
getHits()
|
java.lang.Object |
getKey()
Implements a method required by the interface that should never be called> |
HashKey |
getKeyHash()
Returns the key hash for the current entry. |
long |
getLastAccessedTime()
Returns the last access time. |
long |
getLastModifiedTime()
Returns the last update time. |
long |
getLastRemoteAccessTime()
Returns the last remote access time. |
int |
getLeaseOwner()
Returns the lease owner |
long |
getLeaseTimeout()
Returns the timeout for a lease of the cache entry |
int |
getLoadCount()
Returns the load count. |
java.lang.Object |
getValue()
Returns the deserialized value for the entry. |
HashKey |
getValueHashKey()
Returns the value key |
boolean |
isExpired(long now)
Returns true is the entry has expired for being idle or having expired. |
boolean |
isIdleExpired(long now)
Returns true is the entry has remained idle too long. |
boolean |
isImplicitNull()
If the null value is due to a missing item in the database. |
boolean |
isLeaseExpired(long now)
|
boolean |
isLocalExpired(int serverIndex,
long now,
long localExpireTimeout)
|
boolean |
isLocalExpired(long now,
CacheConfig config)
Returns true if the local (unchecked) expire time. |
boolean |
isServerVersionValid()
Returns true if the server version (startup count) matches the database. |
boolean |
isUnloadedValue()
|
boolean |
isValid()
|
boolean |
isValueExpired(long now)
Returns true if the value of the entry has expired. |
boolean |
isValueNull()
Returns true if the value is null |
void |
setBlob(java.sql.Blob blob)
|
void |
setLastAccessTime(long accessTime)
Sets the last access time. |
void |
setLastRemoteAccessTime(long accessTime)
Sets the last remote access time. |
void |
setLeaseOwner(int leaseOwner,
long now)
Sets the owner |
void |
setObjectValue(java.lang.Object value)
Sets the deserialized value for the entry. |
java.lang.Object |
setValue(java.lang.Object value)
Implements a method required by the interface that should never be called> |
java.lang.String |
toString()
|
| Methods inherited from class com.caucho.server.distcache.MnodeValue |
|---|
getAccessedExpireTimeout, getCacheHash, getFlags, getModifiedExpireTimeout, getUserFlags, getValueHash, getValueLength, getVersion |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.caucho.distcache.ExtCacheEntry |
|---|
getAccessedExpireTimeout, getModifiedExpireTimeout, getUserFlags, getValueLength, getVersion |
| Field Detail |
|---|
public static final MnodeEntry NULL
public static final HashKey NULL_KEY
public static final HashKey ANY_KEY
| Constructor Detail |
|---|
public MnodeEntry(HashKey valueHash,
long valueLength,
long version,
java.lang.Object value,
HashKey cacheHash,
long flags,
long accessedExpireTimeout,
long modifiedExpireTimeout,
long leaseTimeout,
long lastAccessTime,
long lastUpdateTime,
boolean isServerVersionValid,
boolean isImplicitNull)
public MnodeEntry(MnodeValue mnodeValue,
java.lang.Object value,
long leaseTimeout,
long lastAccessTime,
long lastUpdateTime,
boolean isServerVersionValid,
boolean isImplicitNull)
public MnodeEntry(MnodeEntry oldMnodeValue,
long accessTimeout,
long lastUpdateTime)
| Method Detail |
|---|
public HashKey getKeyHash()
ExtCacheEntry
getKeyHash in interface ExtCacheEntrypublic long getLastAccessedTime()
getLastAccessedTime in interface ExtCacheEntrypublic void setLastAccessTime(long accessTime)
public long getLastRemoteAccessTime()
public void setLastRemoteAccessTime(long accessTime)
public long getLastModifiedTime()
getLastModifiedTime in interface ExtCacheEntrypublic final long getExpirationTime()
public final boolean isLocalExpired(int serverIndex,
long now,
long localExpireTimeout)
public final boolean isLeaseExpired(long now)
public final boolean isLocalExpired(long now,
CacheConfig config)
public final boolean isExpired(long now)
isExpired in interface ExtCacheEntrypublic final boolean isValueExpired(long now)
public final boolean isIdleExpired(long now)
public final int getLeaseOwner()
getLeaseOwner in interface ExtCacheEntry
public final void setLeaseOwner(int leaseOwner,
long now)
public final void clearLease()
public long getAccessExpireTimeoutWindow()
public long getLeaseTimeout()
getLeaseTimeout in interface ExtCacheEntrypublic final void setObjectValue(java.lang.Object value)
public boolean isValueNull()
isValueNull in interface ExtCacheEntrypublic final java.lang.Object getValue()
getValue in interface ExtCacheEntrygetValue in interface Cache.Entrypublic java.sql.Blob getBlob()
public void setBlob(java.sql.Blob blob)
public HashKey getValueHashKey()
ExtCacheEntry
getValueHashKey in interface ExtCacheEntrypublic HashKey getCacheHashKey()
public boolean isServerVersionValid()
public boolean isImplicitNull()
public boolean isUnloadedValue()
public int compareTo(MnodeEntry mnode)
public int getLoadCount()
ExtCacheEntry
getLoadCount in interface ExtCacheEntrypublic java.lang.Object getKey()
getKey in interface Cache.Entrypublic java.lang.Object setValue(java.lang.Object value)
public long getCreationTime()
public boolean isValid()
isValid in interface ExtCacheEntrypublic int getHits()
public java.lang.String toString()
toString in class MnodeValue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||