org.mentawai.cache
Class SynchronizedCache

java.lang.Object
  extended by org.mentawai.cache.SynchronizedCache
All Implemented Interfaces:
org.jgroups.MessageListener, Cache

public class SynchronizedCache
extends java.lang.Object
implements Cache, org.jgroups.MessageListener


Field Summary
static java.lang.String JGROUPS_PROTOCOL_STACK
           
 
Constructor Summary
SynchronizedCache(java.lang.String name, java.lang.String groupname, int capacity, java.lang.Class cacheImpl)
           
SynchronizedCache(java.lang.String name, java.lang.String groupname, int capacity, java.lang.Class cacheImpl, java.lang.String jgroups_protocol_stack)
           
SynchronizedCache(java.lang.String name, java.lang.String groupname, int capacity, float load, java.lang.Class cacheImpl)
           
SynchronizedCache(java.lang.String name, java.lang.String groupname, int capacity, float load, java.lang.Class cacheImpl, java.lang.String jgroups_protocol_stack)
           
 
Method Summary
 void clear()
           
 java.lang.Object get(java.lang.Object key)
           
 byte[] getState()
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
           
 void receive(org.jgroups.Message msg)
           
 java.lang.Object remove(java.lang.Object key)
           
 void setState(byte[] state)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

JGROUPS_PROTOCOL_STACK

public static final java.lang.String JGROUPS_PROTOCOL_STACK
See Also:
Constant Field Values
Constructor Detail

SynchronizedCache

public SynchronizedCache(java.lang.String name,
                         java.lang.String groupname,
                         int capacity,
                         java.lang.Class cacheImpl,
                         java.lang.String jgroups_protocol_stack)

SynchronizedCache

public SynchronizedCache(java.lang.String name,
                         java.lang.String groupname,
                         int capacity,
                         java.lang.Class cacheImpl)

SynchronizedCache

public SynchronizedCache(java.lang.String name,
                         java.lang.String groupname,
                         int capacity,
                         float load,
                         java.lang.Class cacheImpl,
                         java.lang.String jgroups_protocol_stack)

SynchronizedCache

public SynchronizedCache(java.lang.String name,
                         java.lang.String groupname,
                         int capacity,
                         float load,
                         java.lang.Class cacheImpl)
Method Detail

get

public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface Cache

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Specified by:
put in interface Cache

remove

public java.lang.Object remove(java.lang.Object key)
Specified by:
remove in interface Cache

clear

public void clear()
Specified by:
clear in interface Cache

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

receive

public void receive(org.jgroups.Message msg)
Specified by:
receive in interface org.jgroups.MessageListener

setState

public void setState(byte[] state)
Specified by:
setState in interface org.jgroups.MessageListener

getState

public byte[] getState()
Specified by:
getState in interface org.jgroups.MessageListener


Copyright © 2005 Mentawai Team. All Rights Reserved.