net.spy.db
Class TransactionPipeline

java.lang.Object
  extended by net.spy.SpyObject
      extended by net.spy.db.TransactionPipeline

public class TransactionPipeline
extends SpyObject

Asynchronous Saver.


Constructor Summary
TransactionPipeline()
          Get a transaction pipeline with no specific name.
TransactionPipeline(java.lang.ThreadGroup tg, java.lang.String name)
          Get an instance of TransactionPipeline.
 
Method Summary
 java.util.concurrent.ScheduledFuture<?> addTransaction(Savable s, SpyConfig conf)
          Add a transaction to the pipeline without a context.
 java.util.concurrent.ScheduledFuture<?> addTransaction(Savable s, SpyConfig conf, SaveContext ctx)
          Add a transaction to the pipeline.
 void shutdown()
          Shut down the pipeline.
 
Methods inherited from class net.spy.SpyObject
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionPipeline

public TransactionPipeline(java.lang.ThreadGroup tg,
                           java.lang.String name)
Get an instance of TransactionPipeline.

Parameters:
tg - the thread group under which threads will be created
name - an optional suffix to the names of the worker created

TransactionPipeline

public TransactionPipeline()
Get a transaction pipeline with no specific name.

Method Detail

shutdown

public void shutdown()
Shut down the pipeline.


addTransaction

public java.util.concurrent.ScheduledFuture<?> addTransaction(Savable s,
                                                              SpyConfig conf,
                                                              SaveContext ctx)
Add a transaction to the pipeline.

Parameters:
s - the savable
conf - the configuration
context - a context for the save

addTransaction

public java.util.concurrent.ScheduledFuture<?> addTransaction(Savable s,
                                                              SpyConfig conf)
Add a transaction to the pipeline without a context.

Parameters:
s - the savable
conf - the configuration


Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.