org.jpox.store.poid
Class AbstractUIDPoidGenerator

java.lang.Object
  extended byorg.jpox.store.poid.AbstractPoidGenerator
      extended byorg.jpox.store.poid.AbstractUIDPoidGenerator
All Implemented Interfaces:
PoidGenerator, javax.jdo.datastore.Sequence
Direct Known Subclasses:
AbstractUUIDPoidGenerator, AUIDPoidGenerator

public abstract class AbstractUIDPoidGenerator
extends AbstractPoidGenerator

Poid generator for a UID format. To be extended by implementations giving the UID in particular forms.

Version:
$Revision: 1.3 $

Field Summary
 
Fields inherited from class org.jpox.store.poid.AbstractPoidGenerator
defaultBlockSize, LOCALISER, name, poidBlock, properties
 
Constructor Summary
AbstractUIDPoidGenerator(java.lang.String name, java.util.Properties props)
          Constructor.
 
Method Summary
protected abstract  java.lang.String getIdentifier()
          Create an identifier in the UID format required.
protected  PoidBlock reserveBlock(long size)
          Method to reserve "size" POIDs to the PoidBlock.
 
Methods inherited from class org.jpox.store.poid.AbstractPoidGenerator
allocate, createRepository, current, currentValue, getName, next, nextValue, obtainPoidBlock, obtainPoidBlock, requiresRepository, reserveBlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractUIDPoidGenerator

public AbstractUIDPoidGenerator(java.lang.String name,
                                java.util.Properties props)
Constructor.

Parameters:
name - Symbolic name for this generator
props - Properties controlling its behaviour
Method Detail

reserveBlock

protected PoidBlock reserveBlock(long size)
Method to reserve "size" POIDs to the PoidBlock.

Specified by:
reserveBlock in class AbstractPoidGenerator
Parameters:
size - The block size
Returns:
The reserved block

getIdentifier

protected abstract java.lang.String getIdentifier()
Create an identifier in the UID format required.

Returns:
The identifier


Copyright © -2007 . All Rights Reserved.