org.jboss.cache.pojo.memory
Class PersistentReference

java.lang.Object
  extended by org.jboss.cache.pojo.memory.PersistentReference
Direct Known Subclasses:
ArgumentPersistentReference, EmptyReference, FieldPersistentReference

public abstract class PersistentReference
extends Object

Base class for persistent references. Persistent reference is a Weak/Soft reference to a reflection object. If the reflection object is garbage collected, the reference is then rebuilt using reflection operations.

Author:
csuconic

Field Summary
static int REFERENCE_SOFT
           
 
Constructor Summary
PersistentReference(Class clazz, Object referencedObject, int referenceType)
           
 
Method Summary
 Object get()
           
protected abstract  Object rebuildReference()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REFERENCE_SOFT

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

PersistentReference

public PersistentReference(Class clazz,
                           Object referencedObject,
                           int referenceType)
Parameters:
clazz - The clazz being used on this object (where we will do reflection operations)
referencedObject - The reflection object being used
referenceType - if REFERENCE_WEAK will use a WeakReference, and if REFERENCE_SOFT will use a SoftReference for referencedObject
Method Detail

get

public Object get()

rebuildReference

protected abstract Object rebuildReference()
                                    throws Exception
Throws:
Exception


Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.