biz.hammurapi.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 biz.hammurapi.cache.Producer
addCache, get, keySet
 
Methods inherited from interface biz.hammurapi.config.Component
setOwner, start, stop
 

Method Detail

put

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

void clear()
Removes all cache entries


remove

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

Parameters:
key -

remove

void remove(Acceptor acceptor)
Removes keys accepted by acceptor

Parameters:
acceptor -

isActive

boolean isActive()
Returns:
true if not shut down


Copyright © 2003 Hammurapi Group. All Rights Reserved.