com.pavelvlasov.cache
Interface Cache

All Superinterfaces:
Component, Producer
All Known Subinterfaces:
AppendableCache
All Known Implementing Classes:
AppendableMemoryCache, MemoryCache, PassiveMemoryCache, SimpleMemoryCache

public interface Cache
extends Producer, Component

Version:
$Revision: 1.2 $
Author:
Pavel Vlasov

Method Summary
 void clear()
          Removes all cache entries
 boolean isActive()
           
 void put(java.lang.Object key, java.lang.Object value, long time, long expirationTime)
          Puts entry to cache
 void remove(Acceptor acceptor)
          Removes keys accepted by acceptor
 void remove(java.lang.Object key)
          Removes entry with specified key
 
Methods inherited from interface com.pavelvlasov.cache.Producer
addCache, get, keySet
 
Methods inherited from interface com.pavelvlasov.config.Component
setOwner, start, stop
 

Method Detail

put

public void put(java.lang.Object key,
                java.lang.Object value,
                long time,
                long expirationTime)
Puts entry to cache

Parameters:
key - Key
value - Value
time - Timestamp (last modified)
expirationTime - Expiration time

clear

public void clear()
Removes all cache entries


remove

public void remove(java.lang.Object key)
Removes entry with specified key

Parameters:
key -

remove

public void remove(Acceptor acceptor)
Removes keys accepted by acceptor

Parameters:
acceptor -

isActive

public boolean isActive()
Returns:
true if not shut down


Copyright © 2003 Hammurapi Group. All Rights Reserved.