com.sun.jini.norm
Class UIDGenerator

java.lang.Object
  extended by com.sun.jini.norm.UIDGenerator

 class UIDGenerator
extends Object

Utility class for generating locally unique IDs.

Author:
Sun Microsystems, Inc.

Field Summary
private  long nextID
          Value of the next ID
 
Constructor Summary
UIDGenerator()
           
 
Method Summary
(package private)  void inUse(long ID)
          Used during log recovery to update the generator that a given ID is in use.
(package private)  long newID()
          Generate ID, this method performs appropriate locking to ensure the returned ID is unique.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nextID

private long nextID
Value of the next ID

Constructor Detail

UIDGenerator

UIDGenerator()
Method Detail

newID

long newID()
Generate ID, this method performs appropriate locking to ensure the returned ID is unique.


inUse

void inUse(long ID)
Used during log recovery to update the generator that a given ID is in use. This method performs no locking.

Parameters:
ID - ID that is in use


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.