KEY - ENTRY - public interface Registry<KEY,ENTRY extends Identifiable<KEY>> extends Writable, org.openbase.jul.pattern.Observable<Map<KEY,ENTRY>>, NameProvider
Shutdownable.ShutdownDeamonTYPE_FIELD_NAME| Modifier and Type | Method and Description |
|---|---|
void |
addDependencyObserver(org.openbase.jul.pattern.Observer<Map<KEY,ENTRY>> observer) |
void |
clear() |
boolean |
contains(ENTRY entry) |
boolean |
contains(KEY key) |
default ENTRY |
get(ENTRY entry) |
ENTRY |
get(KEY key) |
List<ENTRY> |
getEntries()
Copies all entries into a list.
|
Map<KEY,ENTRY> |
getEntryMap()
An unmodifiable map of the current entry map.
|
String |
getName()
Method returns the name of this registry.
|
boolean |
isConsistent() |
boolean |
isEmpty()
Return true if this registry does not contain any entries.
|
default boolean |
isEmtpy()
Deprecated.
since 1.3: removed because of typo. Please use isEmpty() instead!
|
boolean |
isReadOnly() |
boolean |
isReady()
This method checks if the registry is not handling any tasks or notification and is currently consistent.
|
boolean |
isSandbox() |
boolean |
recursiveTryLockRegistry(Set<Registry> lockedRegistries)
Try to acquire the write lock for this registry and the registries it depends
on recursively.
|
ENTRY |
register(ENTRY entry)
Method registers the given entry.
|
ENTRY |
remove(ENTRY entry) |
ENTRY |
remove(KEY key) |
void |
removeDependencyObserver(org.openbase.jul.pattern.Observer<Map<KEY,ENTRY>> observer) |
int |
size()
Method returns the amount of registry entries.
|
boolean |
tryLockRegistry()
Try to acquire the write lock for this registry.
|
void |
unlockRegistry()
Unlock the write lock of the registry.
|
ENTRY |
update(ENTRY entry) |
checkWriteAccess, isWritableaddObserver, getLatestValue, getValue, getValueFuture, isValueAvailable, removeObserver, waitForValue, waitForValueregisterShutdownHook, registerShutdownHook, shutdownString getName() throws NotAvailableException
getName in interface NameProviderNotAvailableException - is thrown if the name is not available.ENTRY register(ENTRY entry) throws CouldNotPerformException
entry - the new entry to register which is not yet included in the registryCouldNotPerformException - is thrown if the given entry is not valid, already registered or something else went wrong during the registration.ENTRY update(ENTRY entry) throws CouldNotPerformException
CouldNotPerformExceptionENTRY remove(KEY key) throws CouldNotPerformException
CouldNotPerformExceptionENTRY remove(ENTRY entry) throws CouldNotPerformException
CouldNotPerformExceptionENTRY get(KEY key) throws CouldNotPerformException
CouldNotPerformExceptiondefault ENTRY get(ENTRY entry) throws CouldNotPerformException
CouldNotPerformExceptionList<ENTRY> getEntries() throws CouldNotPerformException
CouldNotPerformException - if something failsMap<KEY,ENTRY> getEntryMap()
boolean contains(ENTRY entry) throws CouldNotPerformException
CouldNotPerformExceptionboolean contains(KEY key) throws CouldNotPerformException
CouldNotPerformExceptionvoid clear()
throws CouldNotPerformException
CouldNotPerformExceptionint size()
boolean isReadOnly()
boolean isConsistent()
boolean isSandbox()
boolean isReady()
boolean isEmpty()
@Deprecated default boolean isEmtpy()
boolean tryLockRegistry()
throws RejectedException
RejectedException - If the registry does not support to be locked externally which is for example the case for remote registries.boolean recursiveTryLockRegistry(Set<Registry> lockedRegistries) throws RejectedException
lockedRegistries - Set of already locked registries. Should be given empty to this method and will contain all locked registries afterwards.RejectedException - If the registry does not support to be locked externally which is for example the case for remote registries.void unlockRegistry()
void addDependencyObserver(org.openbase.jul.pattern.Observer<Map<KEY,ENTRY>> observer)
Copyright © 2015–2018 openbase.org. All rights reserved.