public abstract class AbstractBackingCacheEntry<K extends Serializable,V extends Cacheable<K>> extends Object implements BackingCacheEntry<K,V>
BackingCacheEntry implementations.| Constructor and Description |
|---|
AbstractBackingCacheEntry() |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(BackingCacheEntry<K,V> entry) |
boolean |
equals(Object object) |
long |
getLastUsed()
Gets the timestamp of the last time this entry was in use.
|
int |
hashCode() |
void |
invalidate()
Causes
BackingCacheEntry.isValid() to hereafter return true. |
boolean |
isInUse()
Gets whether this entry is in use by a caller.
|
boolean |
isPrePassivated()
Gets whether the entry can be passivated without invoking any callbacks on the underlying item.
|
boolean |
isValid()
Whether this entry has been invalidated (in which case it should be reacquired).
|
void |
setInUse(boolean inUse)
Sets whether this entry is in use by a caller.
|
void |
setLastUsed(long lastUsed)
Exposed as public only as an aid to unit tests.
|
void |
setPrePassivated(boolean prePassivated)
Sets whether the entry can be passivated without invoking any callbacks on the underlying item.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetUnderlyingItem, lock, tryLock, unlockisModifiedgetIdpublic long getLastUsed()
BackingCacheEntrygetLastUsed in interface BackingCacheEntry<K extends Serializable,V extends Cacheable<K>>public boolean isInUse()
BackingCacheEntryisInUse in interface BackingCacheEntry<K extends Serializable,V extends Cacheable<K>>public void setInUse(boolean inUse)
BackingCacheEntrysetInUse in interface BackingCacheEntry<K extends Serializable,V extends Cacheable<K>>public void setLastUsed(long lastUsed)
lastUsed - time since epoch when last usedpublic boolean isPrePassivated()
BackingCacheEntryisPrePassivated in interface BackingCacheEntry<K extends Serializable,V extends Cacheable<K>>public void setPrePassivated(boolean prePassivated)
BackingCacheEntrysetPrePassivated in interface BackingCacheEntry<K extends Serializable,V extends Cacheable<K>>public void invalidate()
BackingCacheEntryBackingCacheEntry.isValid() to hereafter return true.
NOTE: This method should only be called with the lock held.
invalidate in interface BackingCacheEntry<K extends Serializable,V extends Cacheable<K>>public boolean isValid()
BackingCacheEntryNOTE: This method should only be called with the lock held.
isValid in interface BackingCacheEntry<K extends Serializable,V extends Cacheable<K>>truee if still valid, falsee if invalidatedBackingCacheEntry.invalidate()public int compareTo(BackingCacheEntry<K,V> entry)
compareTo in interface Comparable<BackingCacheEntry<K extends Serializable,V extends Cacheable<K>>>Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.