org.jboss.cache.pojo.impl
Class PojoInstance

java.lang.Object
  extended by org.jboss.cache.pojo.impl.PojoInstance
All Implemented Interfaces:
java.io.Serializable

public class PojoInstance
extends java.lang.Object
implements java.io.Serializable

POJO class metadata information. When an object is looked up or put in PojoCache, this object will be advised with a CacheFieldInterceptor. The underlying cache stores a reference to this object (for example to update the instance variables, etc.). Since this reference need to be transactional but never replicated (the reference is only valid within the VM this reference is thus stored into an PojoReference (as a transient field). In addition, this instance also serves as a metadata for PojoCache. E.g., it has a reference counting for multiple references and reference FQN.

Author:
Ben Wang
See Also:
Serialized Form

Field Summary
static int INITIAL_COUNTER_VALUE
           
static java.lang.String KEY
           
 
Constructor Summary
PojoInstance()
           
PojoInstance(java.lang.Object instance)
           
 
Method Summary
 void addXFqnIntoList(Fqn fqn)
           
 int decrementRefCount(Fqn sourceFqn)
           
 java.lang.Object get()
           
 Fqn getAndRemoveFirstFqnInList()
           
 java.lang.String getInternalFqn()
           
 java.lang.Class getPojoClass()
           
 int getRefCount()
           
 java.util.List<Fqn> getReferences()
           
 int incrementRefCount(Fqn sourceFqn)
           
 void removeInternalFqn()
           
 void set(java.lang.Object instance)
           
 void setInternalFqn(java.lang.String refFqn)
           
 void setPojoClass(java.lang.Class clazz)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY

public static final java.lang.String KEY
See Also:
Constant Field Values

INITIAL_COUNTER_VALUE

public static final int INITIAL_COUNTER_VALUE
See Also:
Constant Field Values
Constructor Detail

PojoInstance

public PojoInstance()

PojoInstance

public PojoInstance(java.lang.Object instance)
Method Detail

setPojoClass

public void setPojoClass(java.lang.Class clazz)

getPojoClass

public java.lang.Class getPojoClass()

get

public java.lang.Object get()

set

public void set(java.lang.Object instance)

getInternalFqn

public java.lang.String getInternalFqn()

setInternalFqn

public void setInternalFqn(java.lang.String refFqn)

removeInternalFqn

public void removeInternalFqn()

incrementRefCount

public int incrementRefCount(Fqn sourceFqn)

decrementRefCount

public int decrementRefCount(Fqn sourceFqn)

getRefCount

public int getRefCount()

getReferences

public java.util.List<Fqn> getReferences()

getAndRemoveFirstFqnInList

public Fqn getAndRemoveFirstFqnInList()

addXFqnIntoList

public void addXFqnIntoList(Fqn fqn)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object