net.java.dev.moskito.util.storage
Class Storage<K,V>
java.lang.Object
net.java.dev.moskito.util.storage.Storage<K,V>
- All Implemented Interfaces:
- Inspectable, IStatsProducer
public class Storage<K,V>
- extends Object
- implements IStatsProducer, Inspectable
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEF_CATEGORY
public static final String DEF_CATEGORY
- See Also:
- Constant Field Values
DEF_SUBSYSTEM
public static final String DEF_SUBSYSTEM
- See Also:
- Constant Field Values
wrapper
private StorageWrapper<K,V> wrapper
instanceCount
private static AtomicInteger instanceCount
name
private String name
category
private String category
subsystem
private String subsystem
stats
private StorageStats stats
statsList
private List<IStats> statsList
creationInfo
private CreationInfo creationInfo
Storage
public Storage(StorageWrapper<K,V> aWrapper)
Storage
public Storage(String aName,
StorageWrapper<K,V> aWrapper)
get
public V get(K key)
put
public V put(K key,
V value)
size
public int size()
isEmpty
public boolean isEmpty()
containsKey
public boolean containsKey(K key)
containsValue
public boolean containsValue(V value)
remove
public V remove(K key)
putAll
public void putAll(Storage<? extends K,? extends V> anotherStorage)
keySet
public Set<K> keySet()
keys
public Collection<K> keys()
values
public Collection<V> values()
clear
public void clear()
getWrapper
private StorageWrapper<K,V> getWrapper()
toMap
public Map<K,V> toMap()
fillMap
public Map<K,V> fillMap(Map<K,V> toFill)
putAll
public void putAll(Map<? extends K,? extends V> anotherMap)
getCategory
public String getCategory()
- Specified by:
getCategory in interface IStatsProducer
getProducerId
public String getProducerId()
- Specified by:
getProducerId in interface IStatsProducer
getStats
public List<IStats> getStats()
- Specified by:
getStats in interface IStatsProducer
getSubsystem
public String getSubsystem()
- Specified by:
getSubsystem in interface IStatsProducer
setSubsystem
public void setSubsystem(String aSubsystem)
setCategory
public void setCategory(String aCategory)
getName
public String getName()
getCreationInfo
public CreationInfo getCreationInfo()
- Specified by:
getCreationInfo in interface Inspectable
Copyright © 2006-2007 MoSKito Project Team. All Rights Reserved.
MoSKito, the open source java monitoring framework