net.sf.ehcache.store
Class CopyStrategyHandler
java.lang.Object
net.sf.ehcache.store.CopyStrategyHandler
public final class CopyStrategyHandler
- extends Object
Utility class for handling element copy based on the copy on read and write configurations.
- Author:
- ljacomet
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CopyStrategyHandler
public CopyStrategyHandler(boolean copyOnRead,
boolean copyOnWrite,
ReadWriteCopyStrategy<Element> copyStrategy,
ClassLoader loader)
- Creates a CopyStrategyHandler based on the copy configuration
- Parameters:
copyOnRead
- copy on read flagcopyOnWrite
- copy on write flagcopyStrategy
- the copy strategy to use
copyElementForReadIfNeeded
public Element copyElementForReadIfNeeded(Element element)
- Perform copy on read on an element if configured
- Parameters:
element
- the element to copy for read
- Returns:
- a copy of the element with the reconstructed original value
Copyright 2001-2014, Terracotta, Inc.