ehcache

net.sf.ehcache.store.compound.factories
Class InMemoryFactory

java.lang.Object
  extended by net.sf.ehcache.store.compound.factories.InMemoryFactory
All Implemented Interfaces:
IdentityElementSubstituteFactory

public class InMemoryFactory
extends Object
implements IdentityElementSubstituteFactory

A simple unlimited capacity in-memory proxy factory.

Author:
Chris Dennis

Constructor Summary
InMemoryFactory()
           
 
Method Summary
 void bind(CompoundStore store)
          Bind a store instance to this factory.
 Element create(Object key, Element element)
          A no-op encode that just returns the unmodified element.
 boolean created(Object object)
          Returns true if this factory created the given object.
 void free(Lock exclusion, Element element)
          Nothing to free, so a no-op.
 Element retrieve(Object key, Element element)
          A no-op decode that just returns the unmodified element.
 void unbind(CompoundStore store)
          Unbinds a store instance from this factory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InMemoryFactory

public InMemoryFactory()
Method Detail

bind

public void bind(CompoundStore store)
Bind a store instance to this factory.

Parameters:
store - store to bind

unbind

public void unbind(CompoundStore store)
Unbinds a store instance from this factory

Parameters:
store - store to unbind

retrieve

public Element retrieve(Object key,
                        Element element)
A no-op decode that just returns the unmodified element.

Parameters:
key - key to which this element is mapped
element - Element or ElementSubstitute to retrieve
Returns:
a decoded Element

create

public Element create(Object key,
                      Element element)
A no-op encode that just returns the unmodified element.

Parameters:
key - key to which this element is mapped
element - Element to encode
Returns:
The potentially substitute Element

free

public void free(Lock exclusion,
                 Element element)
Nothing to free, so a no-op.

element - Element or ElementSubstitute being free'd.

created

public boolean created(Object object)
Returns true if this factory created the given object.

Parameters:
object - object to check
Returns:
true if object created by this factory

ehcache

true