biz.hammurapi.cache
Class AppendableMemoryCache

java.lang.Object
  extended by biz.hammurapi.cache.AbstractProducer
      extended by biz.hammurapi.cache.MemoryCache
          extended by biz.hammurapi.cache.AppendableMemoryCache
All Implemented Interfaces:
AppendableCache, Cache, Producer, Component

public class AppendableMemoryCache
extends MemoryCache
implements AppendableCache

Cache which supports addition of entries.

Author:
Pavel Vlasov

Field Summary
 
Fields inherited from class biz.hammurapi.cache.MemoryCache
cache, CLEANUP_INTERVAL, producer, reverseCache
 
Constructor Summary
AppendableMemoryCache(AppendableProducer producer, Cache fallBack, MeasurementCategory measurementCategory)
           
AppendableMemoryCache(AppendableProducer producer, Cache fallBack, MeasurementCategory measurementCategory, java.util.Timer timer, long cleanupInterval)
           
 
Method Summary
 java.lang.Object add(java.lang.Object value, long time, long expirationTime)
          Add new value to the cache
 
Methods inherited from class biz.hammurapi.cache.MemoryCache
clear, finalize, get, isActive, keySet, put, remove, remove, setOwner, start, stop
 
Methods inherited from class biz.hammurapi.cache.AbstractProducer
addCache, onRemove
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface biz.hammurapi.cache.Cache
clear, isActive, put, remove, remove
 
Methods inherited from interface biz.hammurapi.cache.Producer
addCache, get, keySet
 
Methods inherited from interface biz.hammurapi.config.Component
setOwner, start, stop
 

Constructor Detail

AppendableMemoryCache

public AppendableMemoryCache(AppendableProducer producer,
                             Cache fallBack,
                             MeasurementCategory measurementCategory)

AppendableMemoryCache

public AppendableMemoryCache(AppendableProducer producer,
                             Cache fallBack,
                             MeasurementCategory measurementCategory,
                             java.util.Timer timer,
                             long cleanupInterval)
Method Detail

add

public java.lang.Object add(java.lang.Object value,
                            long time,
                            long expirationTime)
Description copied from interface: AppendableCache
Add new value to the cache

Specified by:
add in interface AppendableCache
time - Time when entry was placed to the cache
expirationTime - Expiration time
Returns:
key for the value


Copyright © 2003 Hammurapi Group. All Rights Reserved.