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 Object
implements Cache, org.jgroups.MessageListener


Field Summary
static String JGROUPS_PROTOCOL_STACK
           
 
Constructor Summary
SynchronizedCache(String name, String groupname, int capacity, Class cacheImpl)
           
SynchronizedCache(String name, String groupname, int capacity, Class cacheImpl, String jgroups_protocol_stack)
           
SynchronizedCache(String name, String groupname, int capacity, float load, Class cacheImpl)
           
SynchronizedCache(String name, String groupname, int capacity, float load, Class cacheImpl, String jgroups_protocol_stack)
           
 
Method Summary
 void clear()
           
 Object get(Object key)
           
 byte[] getState()
           
 Object put(Object key, Object value)
           
 void receive(org.jgroups.Message msg)
           
 Object remove(Object key)
           
 void setState(byte[] state)
           
 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 String JGROUPS_PROTOCOL_STACK
See Also:
Constant Field Values
Constructor Detail

SynchronizedCache

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

SynchronizedCache

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

SynchronizedCache

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

SynchronizedCache

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

get

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

put

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

remove

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

clear

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

toString

public String toString()
Overrides:
toString in class 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 © 2013. All Rights Reserved.