Rio Project 4.2 API Documentation



org.rioproject.watch
Class QueuedReplicator

java.lang.Object
  extended by org.rioproject.watch.QueuedReplicator
All Implemented Interfaces:
Serializable, WatchDataReplicator
Direct Known Subclasses:
WatchDataReplicatorProxy

public abstract class QueuedReplicator
extends Object
implements WatchDataReplicator, Serializable

Provides a queued approach to replicate a Watch record.

See Also:
Serialized Form

Constructor Summary
QueuedReplicator()
           
 
Method Summary
 void addCalculable(Calculable calculable)
          Archive a record from the WatchDataSource history by placing it on a queue
protected abstract  void bulkReplicate(Collection<Calculable> calculables)
          Performs the actual write to the underlying resource
 void close()
          Closes the WatchDataReplicator
protected  void closeResource()
          Closes the underlying Resource.
protected abstract  void replicate(Calculable calculable)
          Performs the actual write to the underlying resource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueuedReplicator

public QueuedReplicator()
Method Detail

replicate

protected abstract void replicate(Calculable calculable)
                           throws IOException
Performs the actual write to the underlying resource

Parameters:
calculable - the Calculable record to replicate
Throws:
IOException - if the write encounters errors

bulkReplicate

protected abstract void bulkReplicate(Collection<Calculable> calculables)
                               throws IOException
Performs the actual write to the underlying resource

Parameters:
calculables - Collection of Calculable records to replicate
Throws:
IOException - if the write encounters errors

closeResource

protected void closeResource()
Closes the underlying Resource. This abstract class does not enforce the implementation of this method. If the underlying resource needs to be closed, implementing classes need to override this method.


close

public void close()
Description copied from interface: WatchDataReplicator
Closes the WatchDataReplicator

Specified by:
close in interface WatchDataReplicator

addCalculable

public void addCalculable(Calculable calculable)
Archive a record from the WatchDataSource history by placing it on a queue

Specified by:
addCalculable in interface WatchDataReplicator
Parameters:
calculable - the Calculable record to archive

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.