Kieker 1.9

kieker.common.util.registry
Interface IRegistry<E>

Type Parameters:
E - the type of the objects
All Known Subinterfaces:
ILookup<E>
All Known Implementing Classes:
Lookup, Registry

public interface IRegistry<E>

A generic interface to assign unique IDs to objects.

Since:
1.5
Author:
Jan Waller

Method Summary
 int get(E value)
          Gets a unique id for an object.
 E get(int i)
          Gets the object associated with the unique id.
 E[] getAll()
          Return an array with all registered objects.
 int getSize()
          Returns the number of registered objects.
 void setRecordReceiver(IMonitoringRecordReceiver recordReceiver)
          Enables logging of newly registered objects.
 

Method Detail

get

int get(E value)
Gets a unique id for an object.

Parameters:
value - the object
Returns:
the unique id
Since:
1.5

get

E get(int i)
Gets the object associated with the unique id.

Parameters:
i - the unique id
Returns:
the associated object
Since:
1.5

getAll

E[] getAll()
Return an array with all registered objects.

Returns:
array of registered objects
Since:
1.5

getSize

int getSize()
Returns the number of registered objects.

Returns:
number of registered objects
Since:
1.5

setRecordReceiver

void setRecordReceiver(IMonitoringRecordReceiver recordReceiver)
Enables logging of newly registered objects. Must only be called for E == String

Parameters:
recordReceiver - the IMonitoringRecordReceiver logged to
Since:
1.5

Kieker 1.9

Copyright 2014 Kieker Project, http://kieker-monitoring.net