E
- the type of registered objectspublic final class Registry<E> extends java.lang.Object implements IRegistry<E>
Constructor and Description |
---|
Registry()
Creates a new, empty registry with a default initial capacity (32), load factor (0.75) and concurrencyLevel (8).
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the whole registry.
|
int |
get(E value)
Gets a unique id for an object.
|
E |
get(int id)
Gets the object associated with the unique id.
|
E[] |
getAll()
Deprecated.
since 1.13 (to be removed in 1.14): Do not iterate through the registry.
|
long |
getId()
Gets the ID of this registry.
|
int |
getSize()
Returns the number of registered objects.
|
void |
remove(E value)
Removes the given element from the registry.
|
void |
setRecordReceiver(IRegistryRecordReceiver recordReceiver)
Enables logging of newly registered objects.
|
java.lang.String |
toString() |
public Registry()
public long getId()
IRegistry
public final void setRecordReceiver(IRegistryRecordReceiver recordReceiver)
setRecordReceiver
in interface IRegistry<E>
recordReceiver
- the IRegistryRecordReceiver logged topublic final int get(E value)
public final E get(int id)
@Deprecated public final E[] getAll()
public final int getSize()
IRegistry
public final void remove(E value)
value
- The element to remove.public final void clear()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 2017 Kieker Project, http://kieker-monitoring.net