Watchmaker Framework API
(Version 0.6.2)

org.uncommons.util.id
Interface IDSource<T extends Serializable>

Type Parameters:
T - The type of ID returned by this source.
All Known Implementing Classes:
CompositeIDSource, IntSequenceIDSource, LongSequenceIDSource, StringPrefixIDSource

public interface IDSource<T extends Serializable>

Defines operations for classes that generate unique identifiers. Generated IDs must be of a Serializable type. The strategy used will vary between implementations. It may be a straightforward sequence or a more complex, less predictable algorithm.

Author:
Daniel Dyer

Method Summary
 T nextID()
          Implementing classes are responsible for synchronization if concurrent invocations of this method are required.
 

Method Detail

nextID

T nextID()
Implementing classes are responsible for synchronization if concurrent invocations of this method are required.

Returns:
The next ID.
Throws:
IDSourceExhaustedException - If this ID source cannot generate any more unique IDs.

Watchmaker Framework API
(Version 0.6.2)