com.metamatrix.common.id.dbid
Class DBIDGenerator

java.lang.Object
  extended by com.metamatrix.common.id.dbid.DBIDGenerator
All Implemented Interfaces:
DBIDController

public class DBIDGenerator
extends java.lang.Object
implements DBIDController


Method Summary
 long getID(java.lang.String context)
          Call to get a unique id for the given context and by default the the id numbers cannot be rolled over and reused.
static DBIDGenerator getInstance()
           
 void setUseMemoryIDGeneration(boolean useInMemory)
          Call to switch whether persistent storage of ID's is to be used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getID

public long getID(java.lang.String context)
           throws DBIDGeneratorException
Call to get a unique id for the given context and by default the the id numbers cannot be rolled over and reused.

Specified by:
getID in interface DBIDController
Parameters:
context - that identifies a unique entity
Returns:
long is the next id
Throws:
DBIDGeneratorException

setUseMemoryIDGeneration

public void setUseMemoryIDGeneration(boolean useInMemory)
Call to switch whether persistent storage of ID's is to be used.

Parameters:
useInMemory - whether or not to use in Memory ID generation

getInstance

public static DBIDGenerator getInstance()


Copyright © 2009. All Rights Reserved.