|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ref.Reference<T>
java.lang.ref.WeakReference
org.fjank.jcache.CacheObject
public class CacheObject
Overrides some of the methods for referenceobjects.
Constructor Summary | |
---|---|
CacheObject(Object key,
Object referent,
CacheGroup group,
CacheRegion region,
ReferenceQueue q)
Creates a new CacheObject object. |
Method Summary | |
---|---|
void |
clear()
|
void |
destroy()
destroys this object |
boolean |
equals(Object arg0)
accesses and refCount is ignored. |
Object |
get()
gets the wrapped real object. |
int |
getAccesses()
returns the number of total accesses to this cacheobject |
AttributesImpl |
getAttributes()
gets the attributes for this object |
CacheGroup |
getGroup()
gets the group this object belongs to |
Object |
getKey()
gets the name of this object |
int |
getRefCount()
returns an indication on how many object keep an reference to this object. |
CacheRegion |
getRegion()
|
void |
invalidate()
invalidates this object |
boolean |
needsLoading()
returns a boolean indication wether the object needs loading or not. |
void |
resetRefCount()
Resets the refcount. |
void |
setAttributes(Attributes attributes)
|
void |
setAttributes(AttributesImpl attributes)
sets the attributes for this object |
String |
toString()
returns a string representation of this object |
Methods inherited from class java.lang.ref.Reference |
---|
enqueue, isEnqueued |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CacheObject(Object key, Object referent, CacheGroup group, CacheRegion region, ReferenceQueue q)
key
- the name of this objectreferent
- the actuall objectgroup
- the group this object belongs toq
- the ReferenceQueue this object goes to wneh the GC determines
that this object is garbage.Method Detail |
---|
public boolean equals(Object arg0)
equals
in class Object
Object.equals(java.lang.Object)
public boolean needsLoading()
public void destroy()
public void invalidate()
public Object get()
get
in class Reference
public String toString()
toString
in class Object
public Object getKey()
public void setAttributes(AttributesImpl attributes)
attributes
- the attributes to set.public void setAttributes(Attributes attributes)
public AttributesImpl getAttributes()
public CacheGroup getGroup()
public int getAccesses()
public int getRefCount()
public void resetRefCount()
public CacheRegion getRegion()
public void clear()
clear
in class Reference
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |