|
||||||||||
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 long |
ANY_KEY
|
static MnodeEntry |
NULL
|
static long |
NULL_KEY
|
Constructor Summary | |
---|---|
MnodeEntry(long valueHash,
long valueLength,
long version,
long flags,
long accessedExpireTimeout,
long modifiedExpireTimeout,
long leaseExpireTimeout,
long valueDataId,
java.lang.Object value,
long lastAccessTime,
long lastModifiedTime,
boolean isServerVersionValid,
boolean isImplicitNull)
|
|
MnodeEntry(MnodeEntry oldMnodeValue,
long valueDataId,
long accessTimeout,
long lastAccessTime)
|
|
MnodeEntry(MnodeValue mnodeValue,
long valueDataId,
java.lang.Object value,
long lastAccessTime,
long lastModifiedTime,
boolean isServerVersionValid,
boolean isImplicitNull,
int leaseOwner)
|
Method Summary | |
---|---|
void |
clearLease()
Sets the owner |
void |
clearLease(int oldLeaseOwner)
Sets the owner |
int |
compareTo(MnodeEntry mnode)
Compares values |
static MnodeEntry |
createInitialNull(CacheConfig config)
|
long |
getAccessExpireTimeoutWindow()
Returns the idle window to avoid too many updates |
java.sql.Blob |
getBlob()
|
long |
getExpirationTime()
Returns the expiration time |
int |
getHits()
|
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 |
MnodeUpdate |
getRemoteUpdate()
Creates an update with local data removed for remote update. |
java.lang.Object |
getValue()
Returns the deserialized value for the entry. |
long |
getValueDataId()
|
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,
CacheConfig config)
Returns true if the local (unchecked) expire time. |
boolean |
isLocalExpired(int serverIndex,
long now,
long localExpireTimeout)
|
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.String |
toString()
|
MnodeEntry |
updateModifiedTime(long now)
|
Methods inherited from class com.caucho.server.distcache.MnodeValue |
---|
getAccessedExpireTimeout, getFlags, getLeaseExpireTimeout, getModifiedExpireTimeout, getUserFlags, getValueHash, getValueLength, getVersion |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final MnodeEntry NULL
public static final long NULL_KEY
public static final long ANY_KEY
Constructor Detail |
---|
public MnodeEntry(long valueHash, long valueLength, long version, long flags, long accessedExpireTimeout, long modifiedExpireTimeout, long leaseExpireTimeout, long valueDataId, java.lang.Object value, long lastAccessTime, long lastModifiedTime, boolean isServerVersionValid, boolean isImplicitNull)
public MnodeEntry(MnodeValue mnodeValue, long valueDataId, java.lang.Object value, long lastAccessTime, long lastModifiedTime, boolean isServerVersionValid, boolean isImplicitNull, int leaseOwner)
public MnodeEntry(MnodeEntry oldMnodeValue, long valueDataId, long accessTimeout, long lastAccessTime)
Method Detail |
---|
public static MnodeEntry createInitialNull(CacheConfig config)
public MnodeEntry updateModifiedTime(long now)
public long getValueDataId()
public long getLastAccessedTime()
public void setLastAccessTime(long accessTime)
public long getLastRemoteAccessTime()
public void setLastRemoteAccessTime(long accessTime)
public long getLastModifiedTime()
public final long getExpirationTime()
public final boolean isLocalExpired(int serverIndex, long now, CacheConfig config)
public final boolean isLocalExpired(int serverIndex, long now, long localExpireTimeout)
public final boolean isLeaseExpired(long now)
public final boolean isExpired(long now)
public final boolean isValueExpired(long now)
public final boolean isIdleExpired(long now)
public final int getLeaseOwner()
public final void setLeaseOwner(int leaseOwner, long now)
public final void clearLease()
public final void clearLease(int oldLeaseOwner)
public long getAccessExpireTimeoutWindow()
public final void setObjectValue(java.lang.Object value)
public boolean isValueNull()
public final java.lang.Object getValue()
public java.sql.Blob getBlob()
public void setBlob(java.sql.Blob blob)
public MnodeUpdate getRemoteUpdate()
public boolean isServerVersionValid()
public boolean isImplicitNull()
public boolean isUnloadedValue()
public int compareTo(MnodeEntry mnode)
public boolean isValid()
public 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 |