com.lti.utils.synchronization
Class SynchronizedObjectHolder<T>

java.lang.Object
  extended by com.lti.utils.synchronization.SynchronizedObjectHolder<T>

public class SynchronizedObjectHolder<T>
extends java.lang.Object

Author:
Ken Larson

Constructor Summary
SynchronizedObjectHolder()
           
SynchronizedObjectHolder(T value)
           
 
Method Summary
 T getObject()
           
 void setObject(T value)
           
 void waitUntilNotNull()
           
 boolean waitUntilNotNull(int timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynchronizedObjectHolder

public SynchronizedObjectHolder()

SynchronizedObjectHolder

public SynchronizedObjectHolder(T value)
Method Detail

setObject

public void setObject(T value)

getObject

public T getObject()

waitUntilNotNull

public void waitUntilNotNull()
                      throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

waitUntilNotNull

public boolean waitUntilNotNull(int timeout)
                         throws java.lang.InterruptedException
Returns:
true if value is now non-null, false if timeout occurred
Throws:
java.lang.InterruptedException