org.infinispan.container
Class VersionedInternalEntryFactoryImpl

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

public class VersionedInternalEntryFactoryImpl
extends InternalEntryFactoryImpl

An implementation that generates versioned entries

Since:
5.1
Author:
Manik Surtani

Constructor Summary
VersionedInternalEntryFactoryImpl()
           
 
Method Summary
 InternalCacheEntry create(Object key, Object value, EntryVersion version)
          Creates a new InternalCacheEntry instance
 InternalCacheEntry create(Object key, Object value, EntryVersion version, long lifespan, long maxIdle)
          Creates a new InternalCacheEntry instance
 InternalCacheEntry create(Object key, Object value, EntryVersion version, long created, long lifespan, long lastUsed, long maxIdle)
          Creates a new InternalCacheEntry instance
 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 org.infinispan.container.InternalEntryFactoryImpl
create, create
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionedInternalEntryFactoryImpl

public VersionedInternalEntryFactoryImpl()
Method Detail

create

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

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

create

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

Specified by:
create in interface InternalEntryFactory
Overrides:
create in class InternalEntryFactoryImpl
Parameters:
key - key to use
value - value to use
version - 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
Overrides:
createValue in class InternalEntryFactoryImpl
Parameters:
cacheEntry - to use to generate a InternalCacheValue
Returns:
an InternalCacheValue

create

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

Specified by:
create in interface InternalEntryFactory
Overrides:
create in class InternalEntryFactoryImpl
Parameters:
key - key to use
value - value to use
version - 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
Overrides:
update in class InternalEntryFactoryImpl
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.