public class SerializationGroupMemberImpl<K extends Serializable,V extends Cacheable<K>,G extends Serializable> extends AbstractBackingCacheEntry<K,V> implements SerializationGroupMember<K,V,G>
SerializationGroupImpl.| Constructor and Description |
|---|
SerializationGroupMemberImpl(V obj,
GroupAwareBackingCache<K,V,G,SerializationGroupMember<K,V,G>> cache) |
| Modifier and Type | Method and Description |
|---|---|
SerializationGroup<K,V,G> |
getGroup()
Gets the
SerializationGroupImpl of which this object is a member. |
G |
getGroupId()
Gets the id for the group
|
K |
getId()
The object identifier.
|
V |
getUnderlyingItem()
Gets the underlying CacheItem.
|
boolean |
isClustered()
Gets whether this member supports clustering functionality.
|
boolean |
isModified()
Gets whether this object's internal state has been modified since
the last request to this method.
|
boolean |
isPreReplicated()
Gets whether pre-replication callbacks have been invoked on the underlying item.
|
void |
lock()
Lock this item, blocking until the lock is acquired.
|
void |
postActivate()
Notification that the group has been activated from a passivated state.
|
void |
postReplicate()
Notification that the previously replicated group has been retrieved from a clustered cache.
|
void |
prePassivate()
Instructs this group member to ensure any prePassivate callbacks are invoked on the underlying item and any internal
references to its group and underlying item are released.
|
void |
preReplicate()
Instructs this group member to ensure any preReplicate callbacks are invoked on the underlying item and any internal
references to its group and underlying item are released.
|
void |
setGroup(SerializationGroup<K,V,G> group)
Sets the
SerializationGroupImpl of which this object is a member. |
void |
setInUse(boolean inUse)
Sets whether this entry is in use by a caller.
|
void |
setPassivatingCache(GroupAwareBackingCache<K,V,G,SerializationGroupMember<K,V,G>> delegate)
Allows our controlling
PassivatingBackingCache to provide us a reference after deserialization. |
void |
setPreReplicated(boolean preReplicated)
Sets whether pre-replication callbacks have been invoked on the underlying item.
|
void |
setUnderlyingItem(V obj)
Sets the underlying
Cacheable associated with this group member. |
String |
toString() |
boolean |
tryLock()
Attempt to lock this item, failing promptly if the lock is already held by another thread.
|
void |
unlock()
Unlock this item.
|
compareTo, equals, getLastUsed, hashCode, invalidate, isInUse, isPrePassivated, isValid, setLastUsed, setPrePassivatedclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetLastUsed, invalidate, isInUse, isPrePassivated, isValid, setPrePassivatedcompareTopublic SerializationGroupMemberImpl(V obj, GroupAwareBackingCache<K,V,G,SerializationGroupMember<K,V,G>> cache)
public K getId()
IdentifiablegetId in interface Identifiable<K extends Serializable>public boolean isModified()
Cacheable
Implementations must be aggressive about returning true if
they are uncertain about whether they have been modified; false
should only be returned if the implementing object is certain its
internal state has not been modified.
isModified in interface Cacheable<K extends Serializable>true if the state has been modified or the
implementing object does not know; false otherwise.public boolean isClustered()
true if clustering is supported, false otherwisepublic V getUnderlyingItem()
BackingCacheEntrygetUnderlyingItem in interface BackingCacheEntry<K extends Serializable,V extends Cacheable<K>>public void setUnderlyingItem(V obj)
Cacheable associated with this group member.setUnderlyingItem in interface SerializationGroupMember<K extends Serializable,V extends Cacheable<K>,G extends Serializable>obj - the cache itempublic SerializationGroup<K,V,G> getGroup()
SerializationGroupImpl of which this object is a member.getGroup in interface SerializationGroupMember<K extends Serializable,V extends Cacheable<K>,G extends Serializable>nullpublic void setGroup(SerializationGroup<K,V,G> group)
SerializationGroupImpl of which this object is a member.setGroup in interface SerializationGroupMember<K extends Serializable,V extends Cacheable<K>,G extends Serializable>group - May be nullpublic G getGroupId()
getGroupId in interface SerializationGroupMember<K extends Serializable,V extends Cacheable<K>,G extends Serializable>public void prePassivate()
SerializationGroupMemberSerializationGroup itself.prePassivate in interface SerializationGroupMember<K extends Serializable,V extends Cacheable<K>,G extends Serializable>public void preReplicate()
SerializationGroupMemberSerializationGroup itself.preReplicate in interface SerializationGroupMember<K extends Serializable,V extends Cacheable<K>,G extends Serializable>public void postActivate()
public boolean isPreReplicated()
SerializationGroupMemberisPreReplicated in interface SerializationGroupMember<K extends Serializable,V extends Cacheable<K>,G extends Serializable>public void setPreReplicated(boolean preReplicated)
SerializationGroupMembersetPreReplicated in interface SerializationGroupMember<K extends Serializable,V extends Cacheable<K>,G extends Serializable>public void postReplicate()
public void setInUse(boolean inUse)
BackingCacheEntrysetInUse in interface BackingCacheEntry<K extends Serializable,V extends Cacheable<K>>setInUse in class AbstractBackingCacheEntry<K extends Serializable,V extends Cacheable<K>>public void setPassivatingCache(GroupAwareBackingCache<K,V,G,SerializationGroupMember<K,V,G>> delegate)
PassivatingBackingCache to provide us a reference after deserialization.setPassivatingCache in interface SerializationGroupMember<K extends Serializable,V extends Cacheable<K>,G extends Serializable>delegate - public void lock()
BackingCacheEntryRuntimeException will be thrown if the thread is interrupted instead of
InterruptedException.lock in interface BackingCacheEntry<K extends Serializable,V extends Cacheable<K>>public boolean tryLock()
BackingCacheEntrytryLock in interface BackingCacheEntry<K extends Serializable,V extends Cacheable<K>>true if the lock was acquired, false otherwisepublic void unlock()
BackingCacheEntryunlock in interface BackingCacheEntry<K extends Serializable,V extends Cacheable<K>>Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.