org.eclipse.net4j.util.registry
Class Registry<K,V>
java.lang.Object
org.eclipse.net4j.util.event.Notifier
org.eclipse.net4j.util.lifecycle.Lifecycle
org.eclipse.net4j.util.container.Container<Map.Entry<K,V>>
org.eclipse.net4j.util.registry.Registry<K,V>
- All Implemented Interfaces:
- Map<K,V>, IContainer<Map.Entry<K,V>>, INotifier, ILifecycle, ILifecycle.DeferrableActivation, IRegistry<K,V>
- Direct Known Subclasses:
- DelegatingRegistry, HashMapRegistry
- public abstract class Registry<K,V>
- extends Container<Map.Entry<K,V>>
- implements IRegistry<K,V>
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle |
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, doDeactivate, dump, getLifecycleState, isActive, isDeferredActivation |
Registry
protected Registry(boolean autoCommit)
Registry
protected Registry()
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Map<K,V>
- Specified by:
isEmpty
in interface IContainer<Map.Entry<K,V>>
- Overrides:
isEmpty
in class Container<Map.Entry<K,V>>
size
public int size()
- Specified by:
size
in interface Map<K,V>
entrySet
public Set<Map.Entry<K,V>> entrySet()
- Specified by:
entrySet
in interface Map<K,V>
keySet
public Set<K> keySet()
- Specified by:
keySet
in interface Map<K,V>
values
public Collection<V> values()
- Specified by:
values
in interface Map<K,V>
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interface Map<K,V>
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interface Map<K,V>
get
public V get(Object key)
- Specified by:
get
in interface Map<K,V>
put
public V put(K key,
V value)
- Requires
commit()
to be called later if not isAutoCommit()
.
- Specified by:
put
in interface Map<K,V>
putAll
public void putAll(Map<? extends K,? extends V> t)
- Requires
commit()
to be called later if not isAutoCommit()
.
- Specified by:
putAll
in interface Map<K,V>
remove
public V remove(Object key)
- Requires
commit()
to be called later if not isAutoCommit()
.
- Specified by:
remove
in interface Map<K,V>
clear
public void clear()
- Requires
commit()
to be called later if not isAutoCommit()
.
- Specified by:
clear
in interface Map<K,V>
getElements
public Map.Entry<K,V>[] getElements()
- Specified by:
getElements
in interface IContainer<Map.Entry<K,V>>
isAutoCommit
public boolean isAutoCommit()
- Specified by:
isAutoCommit
in interface IRegistry<K,V>
setAutoCommit
public void setAutoCommit(boolean autoCommit)
- Specified by:
setAutoCommit
in interface IRegistry<K,V>
commit
public void commit(boolean notifications)
- Specified by:
commit
in interface IRegistry<K,V>
commit
public void commit()
- Specified by:
commit
in interface IRegistry<K,V>
toString
public String toString()
- Overrides:
toString
in class Lifecycle
register
protected V register(K key,
V value)
deregister
protected V deregister(Object key)
getTransaction
protected Registry.Transaction getTransaction()
autoCommit
protected void autoCommit()
getMap
protected abstract Map<K,V> getMap()
Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.