com.sleepycat.je.rep.stream
Class FeederTxns

java.lang.Object
  extended by com.sleepycat.je.rep.stream.FeederTxns

public class FeederTxns
extends Object

FeederTxns manages transactions that need acknowledgments.


Constructor Summary
FeederTxns(RepImpl repImpl)
           
 
Method Summary
 void awaitReplicaAcks(MasterTxn txn, int timeoutMs)
          Waits for the required number of replica acks to come through.
 void clearTransactionAcks(Txn txn)
           
 void close()
           
 MasterTxn getAckTxn(long txnId)
          Returns the transaction if it's waiting for acknowledgments.
 StatGroup getStats()
           
 void noteReplicaAck(long txnId)
          Notes that an acknowledgment was received from a replica.
 void resetStats()
           
 void setupForAcks(MasterTxn txn)
          Create a new TxnInfo so that transaction commit can wait onthe latch it sets up.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeederTxns

public FeederTxns(RepImpl repImpl)
Method Detail

setupForAcks

public void setupForAcks(MasterTxn txn)
Create a new TxnInfo so that transaction commit can wait onthe latch it sets up.

Parameters:
txn - identifies the transaction.

getAckTxn

public MasterTxn getAckTxn(long txnId)
Returns the transaction if it's waiting for acknowledgments. Returns null otherwise.


clearTransactionAcks

public void clearTransactionAcks(Txn txn)

noteReplicaAck

public void noteReplicaAck(long txnId)
Notes that an acknowledgment was received from a replica.

Parameters:
txnId - the transaction that was acknowledged.

awaitReplicaAcks

public void awaitReplicaAcks(MasterTxn txn,
                             int timeoutMs)
                      throws InterruptedException
Waits for the required number of replica acks to come through.

Parameters:
txn - identifies the transaction to wait for.
timeoutMs - the amount of time to wait for the acknowledgments before giving up.
Throws:
InsufficientAcksException - if the ack requirements were not met
InterruptedException

close

public void close()

getStats

public StatGroup getStats()

resetStats

public void resetStats()


Copyright (c) 2004-2010 Oracle. All rights reserved.