org.infinispan.container
Class InternalEntryFactoryImpl

java.lang.Object
  extended by org.infinispan.container.InternalEntryFactoryImpl
All Implemented Interfaces:
InternalEntryFactory
Direct Known Subclasses:
VersionedInternalEntryFactoryImpl

public class InternalEntryFactoryImpl
extends Object
implements InternalEntryFactory

An implementation that generates non-versioned entries

Since:
5.1
Author:
Manik Surtani

Constructor Summary
InternalEntryFactoryImpl()
           
 
Method Summary
 InternalCacheEntry create(CacheEntry cacheEntry)
          Creates a new InternalCacheEntry instance based on the key, value, version and timestamp/lifespan information reflected in the CacheEntry instance passed in.
 InternalCacheEntry create(Object key, Object value, EntryVersion ignored)
          Creates a new InternalCacheEntry instance
 InternalCacheEntry create(Object key, Object value, EntryVersion ignored, long lifespan, long maxIdle)
          Creates a new InternalCacheEntry instance
 InternalCacheEntry create(Object key, Object value, EntryVersion ignored, long created, long lifespan, long lastUsed, long maxIdle)
          Creates a new InternalCacheEntry instance
 InternalCacheEntry create(Object key, Object value, InternalCacheEntry cacheEntry)
          Creates a new InternalCacheEntry instance based on the version and timestamp/lifespan information reflected in the CacheEntry instance passed in.
 InternalCacheValue createValue(CacheEntry cacheEntry)
          Creates an InternalCacheValue based on the InternalCacheEntry passed in.
 InternalCacheEntry update(InternalCacheEntry ice, long lifespan, long maxIdle)
          Updates an existing InternalCacheEntry with new lifespan and maxIdle values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalEntryFactoryImpl

public InternalEntryFactoryImpl()
Method Detail

create

public InternalCacheEntry create(Object key,
                                 Object value,
                                 EntryVersion ignored)
Description copied from interface: InternalEntryFactory
Creates a new InternalCacheEntry instance

Specified by:
create in interface InternalEntryFactory
Parameters:
key - key to use
value - value to use
ignored - version to use
Returns:
a new InternalCacheEntry

create

public InternalCacheEntry create(CacheEntry cacheEntry)
Description copied from interface: InternalEntryFactory
Creates a new InternalCacheEntry instance based on the key, value, version and timestamp/lifespan information reflected in the CacheEntry instance passed in.

Specified by:
create in interface InternalEntryFactory
Parameters:
cacheEntry - cache entry to copy
Returns:
a new InternalCacheEntry

create

public InternalCacheEntry create(Object key,
                                 Object value,
                                 InternalCacheEntry cacheEntry)
Description copied from interface: InternalEntryFactory
Creates a new InternalCacheEntry instance based on the version and timestamp/lifespan information reflected in the CacheEntry instance passed in. Key and value are both passed in explicitly.

Specified by:
create in interface InternalEntryFactory
Parameters:
key - key to use
value - value to use
cacheEntry - cache entry to retrieve version and timestamp/lifespan information from
Returns:
a new InternalCacheEntry

create

public InternalCacheEntry create(Object key,
                                 Object value,
                                 EntryVersion ignored,
                                 long created,
                                 long lifespan,
                                 long lastUsed,
                                 long maxIdle)
Description copied from interface: InternalEntryFactory
Creates a new InternalCacheEntry instance

Specified by:
create in interface InternalEntryFactory
Parameters:
key - key to use
value - value to use
ignored - version to use
created - creation timestamp to use
lifespan - lifespan to use
lastUsed - lastUsed timestamp to use
maxIdle - maxIdle to use
Returns:
a new InternalCacheEntry

createValue

public InternalCacheValue createValue(CacheEntry cacheEntry)
Description copied from interface: InternalEntryFactory
Creates an InternalCacheValue based on the InternalCacheEntry passed in.

Specified by:
createValue in interface InternalEntryFactory
Parameters:
cacheEntry - to use to generate a InternalCacheValue
Returns:
an InternalCacheValue

create

public InternalCacheEntry create(Object key,
                                 Object value,
                                 EntryVersion ignored,
                                 long lifespan,
                                 long maxIdle)
Description copied from interface: InternalEntryFactory
Creates a new InternalCacheEntry instance

Specified by:
create in interface InternalEntryFactory
Parameters:
key - key to use
value - value to use
ignored - version to use
lifespan - lifespan to use
maxIdle - maxIdle to use
Returns:
a new InternalCacheEntry

update

public InternalCacheEntry update(InternalCacheEntry ice,
                                 long lifespan,
                                 long maxIdle)
Description copied from interface: InternalEntryFactory
Updates an existing InternalCacheEntry with new lifespan and maxIdle values. This may result in a new InternalCacheEntry instance being created, as a different InternalCacheEntry implementation may be more appropriate to suit the new lifespan and maxIdle values. As such, one should consider the InternalCacheEntry passed in as a parameter as passed by value and not by reference.

Specified by:
update in interface InternalEntryFactory
Parameters:
ice - original internal cache entry
lifespan - new lifespan to use
maxIdle - new maxIdle to use
Returns:
a new InternalCacheEntry instance

-->

Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.