org.apache.commons.id.uuid.state
Class ReadWriteFileStateImpl

java.lang.Object
  extended by org.apache.commons.id.uuid.state.ReadOnlyResourceStateImpl
      extended by org.apache.commons.id.uuid.state.ReadWriteFileStateImpl
All Implemented Interfaces:
java.io.Serializable, State

public class ReadWriteFileStateImpl
extends ReadOnlyResourceStateImpl
implements State

The ReadWriteFileStateImpl is an implementation of the State interface. This implementation provides better guarantees that no duplicate UUID's will be generated since the last time stamp, and last clock sequence are stored to a persistent file.

Version:
$Id: ReadWriteFileStateImpl.java 480488 2006-11-29 08:57:26Z bayard $
Author:
Commons-Id team
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.commons.id.uuid.state.ReadOnlyResourceStateImpl
CONFIG_FILENAME_KEY
 
Fields inherited from interface org.apache.commons.id.uuid.state.State
DEFAULT_STATE_IMPL
 
Constructor Summary
ReadWriteFileStateImpl()
           
 
Method Summary
 void store(java.util.Set nodes)
          Persists the UUID generator state to file.
 
Methods inherited from class org.apache.commons.id.uuid.state.ReadOnlyResourceStateImpl
getNodes, getSynchInterval, load, parse, store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.id.uuid.state.State
getNodes, getSynchInterval, load, store
 

Constructor Detail

ReadWriteFileStateImpl

public ReadWriteFileStateImpl()
Method Detail

store

public void store(java.util.Set nodes)
           throws java.io.IOException
Persists the UUID generator state to file.

Specified by:
store in interface State
Overrides:
store in class ReadOnlyResourceStateImpl
Parameters:
nodes - a Collection of Nodes to store.
Throws:
java.io.IOException - - an input/output Exception perhaps due to StringBuffer#append
See Also:
State.store(java.util.Set)


Copyright © 2003-2008 The Apache Software Foundation. All Rights Reserved.