org.csc.phynixx.watchdog.objectref
Class WeakObjectReference<T>

java.lang.Object
  extended by java.lang.ref.Reference<T>
      extended by java.lang.ref.WeakReference<T>
          extended by org.csc.phynixx.watchdog.objectref.WeakObjectReference<T>
All Implemented Interfaces:
IObjectReference<T>

public class WeakObjectReference<T>
extends WeakReference<T>
implements IObjectReference<T>

the watchdog references the conditions weakly. If any condition is not referenced by anybody but the watchdog it shut be handed to gc.

Author:
Christoph Schmidt-Casdorff

Constructor Summary
WeakObjectReference(T objectRef)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getObjectDescription()
           
 int hashCode()
           
 boolean isStale()
           
 boolean isWeakReference()
           
 String toString()
           
 
Methods inherited from class java.lang.ref.Reference
clear, enqueue, get, isEnqueued
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.csc.phynixx.watchdog.objectref.IObjectReference
get
 

Constructor Detail

WeakObjectReference

public WeakObjectReference(T objectRef)
Method Detail

getObjectDescription

public String getObjectDescription()
Specified by:
getObjectDescription in interface IObjectReference<T>

isWeakReference

public boolean isWeakReference()
Specified by:
isWeakReference in interface IObjectReference<T>

isStale

public boolean isStale()
Specified by:
isStale in interface IObjectReference<T>

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015. All rights reserved.