com.thoughtworks.proxy.kit
Class NoOperationResetter<T>

java.lang.Object
  extended by com.thoughtworks.proxy.kit.NoOperationResetter<T>
All Implemented Interfaces:
Resetter<T>, Serializable

public class NoOperationResetter<T>
extends Object
implements Resetter<T>, Serializable

A Resetter that has no operation. This Resetter implementation will just return the object to the pool without further interaction.

Since:
0.2
Author:
Jörg Schaible
See Also:
Serialized Form

Constructor Summary
NoOperationResetter()
           
 
Method Summary
 boolean reset(T object)
          Reset the pooled object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoOperationResetter

public NoOperationResetter()
Method Detail

reset

public boolean reset(T object)
Reset the pooled object. The implementation may do anything to reset the state of the pooled element. If the element is definitely exhausted, a return value of false prevents the element from returning into the pool and the instance is garbage collected. Returns just true.

Specified by:
reset in interface Resetter<T>
Parameters:
object - the object to reset
Returns:
true if the element can be used for further tasks.


Copyright © 2005-2010 Codehaus. All Rights Reserved.