com.pavelvlasov.cache
Class AppendableMemoryCache

java.lang.Object
  extended bycom.pavelvlasov.cache.AbstractProducer
      extended bycom.pavelvlasov.cache.MemoryCache
          extended bycom.pavelvlasov.cache.AppendableMemoryCache
All Implemented Interfaces:
AppendableCache, Cache, Component, Producer

public class AppendableMemoryCache
extends MemoryCache
implements AppendableCache

Cache which supports addition of entries.

Author:
Pavel Vlasov

Field Summary
 
Fields inherited from class com.pavelvlasov.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 com.pavelvlasov.cache.MemoryCache
clear, finalize, get, isActive, keySet, put, remove, remove, setOwner, start, stop
 
Methods inherited from class com.pavelvlasov.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 com.pavelvlasov.cache.Cache
clear, isActive, put, remove, remove
 
Methods inherited from interface com.pavelvlasov.cache.Producer
addCache, get, keySet
 
Methods inherited from interface com.pavelvlasov.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
Parameters:
value -
time - Time when entry was placed to the cache
expirationTime - Expiration time
Returns:
key for the value


Copyright © 2003 Hammurapi Group. All Rights Reserved.