org.mentawai.cache
Class DistributedCache

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

public class DistributedCache
extends Object
implements Cache, org.jgroups.MessageListener


Field Summary
static String JGROUPS_PROTOCOL_STACK
           
 
Constructor Summary
DistributedCache(String name, String groupname, int capacity)
           
DistributedCache(String name, String groupname, int capacity, Class cacheImpl)
           
DistributedCache(String name, String groupname, int capacity, Class cacheImpl, String jgroups_protocol_stack)
           
DistributedCache(String name, String groupname, int capacity, float load, Class cacheImpl)
           
DistributedCache(String name, String groupname, int capacity, float load, Class cacheImpl, String jgroups_protocol_stack)
           
 
Method Summary
 void clear()
           
protected  void clear(boolean send)
           
 Object get(Object key)
           
 byte[] getState()
           
 Object put(Object key, Object value)
           
protected  Object put(Object key, Object value, boolean send)
           
 void receive(org.jgroups.Message msg)
           
 Object remove(Object key)
           
protected  Object remove(Object key, boolean send)
           
 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

DistributedCache

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

DistributedCache

public DistributedCache(String name,
                        String groupname,
                        int capacity)

DistributedCache

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

DistributedCache

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

DistributedCache

public DistributedCache(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

put

protected Object put(Object key,
                     Object value,
                     boolean send)

remove

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

remove

protected Object remove(Object key,
                        boolean send)

clear

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

clear

protected void clear(boolean send)

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.