public abstract class Registry<K,V> extends Container<java.util.Map.Entry<K,V>> implements IRegistry<K,V>
Modifier and Type | Class and Description |
---|---|
protected class |
Registry.Transaction |
IContainer.Modifiable<E>, IContainer.Persistable<E>, IContainer.Persistence<E>
ILifecycle.DeferrableActivation
Modifier | Constructor and Description |
---|---|
protected |
Registry() |
protected |
Registry(boolean autoCommit) |
Modifier and Type | Method and Description |
---|---|
protected void |
autoCommit() |
void |
clear()
Requires
commit() to be called later if not isAutoCommit() . |
void |
commit() |
void |
commit(boolean notifications) |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
protected V |
deregister(java.lang.Object key) |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
V |
get(java.lang.Object key) |
java.util.Map.Entry<K,V>[] |
getElements() |
protected abstract java.util.Map<K,V> |
getMap() |
protected Registry.Transaction |
getTransaction() |
boolean |
isAutoCommit() |
boolean |
isEmpty() |
java.util.Set<K> |
keySet() |
V |
put(K key,
V value)
Requires
commit() to be called later if not isAutoCommit() . |
void |
putAll(java.util.Map<? extends K,? extends V> t)
Requires
commit() to be called later if not isAutoCommit() . |
protected V |
register(K key,
V value) |
V |
remove(java.lang.Object key)
Requires
commit() to be called later if not isAutoCommit() . |
void |
setAutoCommit(boolean autoCommit) |
int |
size() |
java.lang.String |
toString() |
java.util.Collection<V> |
values() |
fireContainerEvent, fireContainerEvent, fireContainerEvent, fireElementAddedEvent, fireElementRemovedEvent, fireElementsAddedEvent, fireElementsRemovedEvent, fireEvent, newContainerEvent, newContainerEvent
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, doDeactivate, dump, getLifecycleState, isActive, isDeferredActivation
addListener, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
addListener, getListeners, hasListeners, removeListener
public boolean isEmpty()
public boolean containsKey(java.lang.Object key)
public boolean containsValue(java.lang.Object value)
public V put(K key, V value)
commit()
to be called later if not isAutoCommit()
.public void putAll(java.util.Map<? extends K,? extends V> t)
commit()
to be called later if not isAutoCommit()
.public V remove(java.lang.Object key)
commit()
to be called later if not isAutoCommit()
.public void clear()
commit()
to be called later if not isAutoCommit()
.public java.util.Map.Entry<K,V>[] getElements()
getElements
in interface IContainer<java.util.Map.Entry<K,V>>
public boolean isAutoCommit()
isAutoCommit
in interface IRegistry<K,V>
public void setAutoCommit(boolean autoCommit)
setAutoCommit
in interface IRegistry<K,V>
protected V deregister(java.lang.Object key)
protected Registry.Transaction getTransaction()
protected void autoCommit()
Copyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html