Package org.serviceconnector.registry
Class Registry<K,V>
java.lang.Object
org.serviceconnector.registry.Registry<K,V>
- Type Parameters:
K- the key typeV- the value type
- All Implemented Interfaces:
IRegistryMXBean
- Direct Known Subclasses:
CacheModuleRegistry,ResponderRegistry,SCMPSessionCompositeRegistry,ServerRegistry,ServiceRegistry,SessionRegistry,SrvServiceRegistry,SubscriptionRegistry,WebSessionRegistry
The Class Registry. Provides functionality for general registries.
- Author:
- JTraber
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
registryMap
The registry map.
-
-
Constructor Details
-
Registry
public Registry()Instantiates a new registry.
-
-
Method Details
-
put
Put an entry into map.- Parameters:
key- the keyvalue- the value
-
get
Gets an entry by key. If key is null - null will be returned.- Parameters:
key- the key- Returns:
- the map bean
-
remove
Removes an entry by key.- Parameters:
key- the key- Returns:
- the v
-
getSize
public int getSize()Gets the size.- Returns:
- the size
-
containsKey
Looks up a key.- Parameters:
key- the key- Returns:
- true, if successful
-
keySet
Key set. The view's iterator is a "weakly consistent" iterator that will never throw ConcurrentModificationException, and guarantees to traverse elements as they existed upon construction of the iterator, and may (but is not guaranteed to) reflect any modifications subsequent to construction.- Returns:
- the set
-
keySetArray
Key set array.- Returns:
- the k[]
-
toString
-
getEntries
Gets the entries.- Specified by:
getEntriesin interfaceIRegistryMXBean- Returns:
- the entries
-