org.axonframework.eventhandling
Class DefaultClusterMetaData

java.lang.Object
  extended by org.axonframework.eventhandling.DefaultClusterMetaData
All Implemented Interfaces:
ClusterMetaData

public class DefaultClusterMetaData
extends Object
implements ClusterMetaData

Default implementation of ClusterMetaData. It is backed by a ConcurrentHashMap but allows the storage of null values. null keys are not allowed.

Since:
1.2
Author:
Allard Buijze

Constructor Summary
DefaultClusterMetaData()
           
 
Method Summary
 Object getProperty(String key)
          Returns the property stored using the given key.
 boolean isPropertySet(String key)
          Indicates whether a value is stored under the given key.
 void removeProperty(String key)
          Removes the value store under the given key.
 void setProperty(String key, Object value)
          Stores a property value under the given key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultClusterMetaData

public DefaultClusterMetaData()
Method Detail

getProperty

public Object getProperty(String key)
Description copied from interface: ClusterMetaData
Returns the property stored using the given key. If no property has been stored using that key, it returns null.

Specified by:
getProperty in interface ClusterMetaData
Parameters:
key - The key under which the property was stored
Returns:
The value stored under the given key

setProperty

public void setProperty(String key,
                        Object value)
Description copied from interface: ClusterMetaData
Stores a property value under the given key.

Specified by:
setProperty in interface ClusterMetaData
Parameters:
key - the key under which to store a value
value - the value to store

removeProperty

public void removeProperty(String key)
Description copied from interface: ClusterMetaData
Removes the value store under the given key. If no such value is available, nothing happens.

Specified by:
removeProperty in interface ClusterMetaData
Parameters:
key - the key to remove

isPropertySet

public boolean isPropertySet(String key)
Description copied from interface: ClusterMetaData
Indicates whether a value is stored under the given key. Will also return true if a null value is stored under the given key.

Specified by:
isPropertySet in interface ClusterMetaData
Parameters:
key - The key to find
Returns:
true if a value was stored under the given key, otherwise false.


Copyright © 2010-2016. All Rights Reserved.