public abstract class AbstractCommitLogService
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.Semaphore |
haveWork |
protected long |
lastSyncedAt |
protected java.util.concurrent.atomic.AtomicLong |
pending |
protected WaitQueue |
syncComplete |
Modifier and Type | Method and Description |
---|---|
void |
awaitTermination() |
void |
finishWriteFor(org.apache.cassandra.db.commitlog.CommitLogSegment.Allocation alloc)
Block for @param alloc to be sync'd as necessary, and handle bookkeeping
|
long |
getCompletedTasks() |
long |
getPendingTasks() |
protected abstract void |
maybeWaitForSync(org.apache.cassandra.db.commitlog.CommitLogSegment.Allocation alloc) |
WaitQueue.Signal |
requestExtraSync()
Sync immediately, but don't block for the sync to cmplete
|
void |
restartUnsafe()
FOR TESTING ONLY
|
void |
shutdown() |
protected volatile long lastSyncedAt
protected final java.util.concurrent.atomic.AtomicLong pending
protected final WaitQueue syncComplete
protected final java.util.concurrent.Semaphore haveWork
public void finishWriteFor(org.apache.cassandra.db.commitlog.CommitLogSegment.Allocation alloc)
protected abstract void maybeWaitForSync(org.apache.cassandra.db.commitlog.CommitLogSegment.Allocation alloc)
public WaitQueue.Signal requestExtraSync()
public void shutdown()
public void restartUnsafe()
public void awaitTermination() throws java.lang.InterruptedException
java.lang.InterruptedException
public long getCompletedTasks()
public long getPendingTasks()
Copyright © 2018 The Apache Software Foundation