com.netflix.astyanax.util
Class WriteAheadMutationBatchExecutor

java.lang.Object
  extended by com.netflix.astyanax.util.WriteAheadMutationBatchExecutor

public class WriteAheadMutationBatchExecutor
extends java.lang.Object


Constructor Summary
WriteAheadMutationBatchExecutor(Keyspace keyspace, java.util.concurrent.ExecutorService executor)
           
WriteAheadMutationBatchExecutor(Keyspace keyspace, int nThreads)
           
 
Method Summary
 com.google.common.util.concurrent.ListenableFuture<com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void>> execute(MutationBatch m)
          Write a mutation to the wal and execute it
 java.util.List<com.google.common.util.concurrent.ListenableFuture<com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void>>> replayWal(int count)
          Replay records from the WAL
 void shutdown()
           
 WriteAheadMutationBatchExecutor usingRetryablePredicate(com.google.common.base.Predicate<java.lang.Exception> predicate)
           
 WriteAheadMutationBatchExecutor usingWriteAheadLog(WriteAheadLog wal)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriteAheadMutationBatchExecutor

public WriteAheadMutationBatchExecutor(Keyspace keyspace,
                                       int nThreads)

WriteAheadMutationBatchExecutor

public WriteAheadMutationBatchExecutor(Keyspace keyspace,
                                       java.util.concurrent.ExecutorService executor)
Method Detail

usingWriteAheadLog

public WriteAheadMutationBatchExecutor usingWriteAheadLog(WriteAheadLog wal)

usingRetryablePredicate

public WriteAheadMutationBatchExecutor usingRetryablePredicate(com.google.common.base.Predicate<java.lang.Exception> predicate)

replayWal

public java.util.List<com.google.common.util.concurrent.ListenableFuture<com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void>>> replayWal(int count)
Replay records from the WAL


execute

public com.google.common.util.concurrent.ListenableFuture<com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void>> execute(MutationBatch m)
                                                                                                                                throws com.netflix.astyanax.connectionpool.exceptions.WalException
Write a mutation to the wal and execute it

Throws:
com.netflix.astyanax.connectionpool.exceptions.WalException

shutdown

public void shutdown()