org.ehcache.impl.copy
Class ReadWriteCopier<T>

java.lang.Object
  extended by org.ehcache.impl.copy.ReadWriteCopier<T>
All Implemented Interfaces:
Copier<T>
Direct Known Subclasses:
IdentityCopier, SerializingCopier

public abstract class ReadWriteCopier<T>
extends java.lang.Object
implements Copier<T>

A helper copier implementation that can be extended directly if the copying operation is the same irrespective of the action performed(read or write).


Constructor Summary
ReadWriteCopier()
           
 
Method Summary
abstract  T copy(T obj)
           
 T copyForRead(T obj)
          Creates a copy of the instance passed in.
 T copyForWrite(T obj)
          Creates a copy of the instance passed in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadWriteCopier

public ReadWriteCopier()
Method Detail

copyForRead

public T copyForRead(T obj)
Description copied from interface: Copier
Creates a copy of the instance passed in.

Specified by:
copyForRead in interface Copier<T>
Parameters:
obj - the instance to copy
Returns:
the copy of the obj instance

copyForWrite

public T copyForWrite(T obj)
Description copied from interface: Copier
Creates a copy of the instance passed in.

Specified by:
copyForWrite in interface Copier<T>
Parameters:
obj - the instance to copy
Returns:
the copy of the obj instance

copy

public abstract T copy(T obj)