org.tentackle.db
Interface IdSource

All Known Implementing Classes:
ObjectId

public interface IdSource

Abstraction for a generic source of ID numbers.

Author:
harald

Method Summary
 long nextId()
          Get the next unique ID.
 void returnId(long id)
          Return an ID back to the pool
 

Method Detail

nextId

long nextId()
            throws ApplicationException
Get the next unique ID.

Returns:
a free ID.
Throws:
ApplicationException - if an ID could not be retrieved.

returnId

void returnId(long id)
              throws ApplicationException
Return an ID back to the pool

Parameters:
id - ID to be returned
Throws:
ApplicationException - if ID could not be returned


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de