net.java.dev.moskito.util.storage
Class Storage<K,V>

java.lang.Object
  extended by net.java.dev.moskito.util.storage.Storage<K,V>
All Implemented Interfaces:
Inspectable, IStatsProducer

public class Storage<K,V>
extends Object
implements IStatsProducer, Inspectable


Field Summary
private  String category
           
private  CreationInfo creationInfo
           
static String DEF_CATEGORY
           
static String DEF_SUBSYSTEM
           
private static AtomicInteger instanceCount
           
private  String name
           
private  StorageStats stats
           
private  List<IStats> statsList
           
private  String subsystem
           
private  StorageWrapper<K,V> wrapper
           
 
Constructor Summary
Storage(StorageWrapper<K,V> aWrapper)
           
Storage(String aName, StorageWrapper<K,V> aWrapper)
           
 
Method Summary
 void clear()
           
 boolean containsKey(K key)
           
 boolean containsValue(V value)
           
 Map<K,V> fillMap(Map<K,V> toFill)
           
 V get(K key)
           
 String getCategory()
           
 CreationInfo getCreationInfo()
           
 String getName()
           
 String getProducerId()
           
 List<IStats> getStats()
           
 String getSubsystem()
           
private  StorageWrapper<K,V> getWrapper()
           
 boolean isEmpty()
           
 Collection<K> keys()
           
 Set<K> keySet()
           
 V put(K key, V value)
           
 void putAll(Map<? extends K,? extends V> anotherMap)
           
 void putAll(Storage<? extends K,? extends V> anotherStorage)
           
 V remove(K key)
           
 void setCategory(String aCategory)
           
 void setSubsystem(String aSubsystem)
           
 int size()
           
 Map<K,V> toMap()
           
 Collection<V> values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

Storage

public Storage(StorageWrapper<K,V> aWrapper)

Storage

public Storage(String aName,
               StorageWrapper<K,V> aWrapper)
Method Detail

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