org.jboss.test.cluster.ds
Class DistributedStateUser
java.lang.Object
org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
org.jboss.test.cluster.ds.DistributedStateUser
- All Implemented Interfaces:
- DistributedState.DSListenerEx (src) , IDistributedState (src) , NotificationBroadcaster (src) , NotificationEmitter (src)
- public class DistributedStateUser
- extends JBossNotificationBroadcasterSupport (src)
- implements IDistributedState (src) , DistributedState.DSListenerEx (src)
Tests of the
|
Method Summary |
void |
flush()
Remove all entries from the cache. |
java.io.Serializable |
get(java.io.Serializable key)
|
java.lang.String |
getCategory()
|
java.lang.String |
getPartitionName()
|
void |
keyHasBeenRemoved(java.lang.String category,
java.io.Serializable key,
java.io.Serializable previousContent,
boolean locallyModified)
Called whenever a key has been removed from a category the called object had
subscribed in. |
void |
put(java.io.Serializable key,
java.io.Serializable value)
|
void |
remove(java.io.Serializable key)
|
void |
setCategory(java.lang.String category)
|
void |
setPartitionName(java.lang.String partitionName)
|
int |
size()
|
void |
start()
|
void |
stop()
|
void |
valueHasChanged(java.lang.String category,
java.io.Serializable key,
java.io.Serializable value,
boolean locallyModified)
Called whenever a key has been added or modified in the category the called object
has subscribed in. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static Logger (src) log
entryMap
protected DistributedState (src) entryMap
category
protected java.lang.String category
partitionName
protected java.lang.String partitionName
sequence
protected long sequence
DistributedStateUser
public DistributedStateUser()
getPartitionName
public java.lang.String getPartitionName()
setPartitionName
public void setPartitionName(java.lang.String partitionName)
getCategory
public java.lang.String getCategory()
setCategory
public void setCategory(java.lang.String category)
start
public void start()
throws java.lang.Exception
- Throws:
java.lang.Exception
stop
public void stop()
get
public java.io.Serializable get(java.io.Serializable key)
- Specified by:
get in interface IDistributedState (src)
put
public void put(java.io.Serializable key,
java.io.Serializable value)
throws java.lang.Exception
- Specified by:
put in interface IDistributedState (src)
- Throws:
java.lang.Exception
remove
public void remove(java.io.Serializable key)
throws java.lang.Exception
- Specified by:
remove in interface IDistributedState (src)
- Throws:
java.lang.Exception
flush
public void flush()
- Remove all entries from the cache.
- Specified by:
flush in interface IDistributedState (src)
size
public int size()
- Specified by:
size in interface IDistributedState (src)
valueHasChanged
public void valueHasChanged(java.lang.String category,
java.io.Serializable key,
java.io.Serializable value,
boolean locallyModified)
- Description copied from interface:
DistributedState.DSListenerEx (src)
- Called whenever a key has been added or modified in the category the called object
has subscribed in.
- Specified by:
valueHasChanged in interface DistributedState.DSListenerEx (src)
- Parameters:
category - The category of the modified/added entrykey - The key that has been added or its value modifiedvalue - The new value of the key
keyHasBeenRemoved
public void keyHasBeenRemoved(java.lang.String category,
java.io.Serializable key,
java.io.Serializable previousContent,
boolean locallyModified)
- Description copied from interface:
DistributedState.DSListenerEx (src)
- Called whenever a key has been removed from a category the called object had
subscribed in.
- Specified by:
keyHasBeenRemoved in interface DistributedState.DSListenerEx (src)
- Parameters:
category - The category under which a key has been removedkey - The key that has been removedpreviousContent - The previous content of the key that has been removed