Class AbstractCommitLogService
- java.lang.Object
-
- org.apache.cassandra.db.commitlog.AbstractCommitLogService
-
- Direct Known Subclasses:
GroupCommitLogService
public abstract class AbstractCommitLogService extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected SemaphorehaveWorkprotected longlastSyncedAtprotected java.util.concurrent.atomic.AtomicLongpendingprotected WaitQueuesyncComplete
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidawaitTermination()voidfinishWriteFor(CommitLogSegment.Allocation alloc)Block for @param alloc to be sync'd as necessary, and handle bookkeepinglonggetCompletedTasks()longgetPendingTasks()protected abstract voidmaybeWaitForSync(CommitLogSegment.Allocation alloc)voidshutdown()voidsyncBlocking()Request sync and wait until the current state is synced.
-
-
-
Method Detail
-
finishWriteFor
public void finishWriteFor(CommitLogSegment.Allocation alloc)
Block for @param alloc to be sync'd as necessary, and handle bookkeeping
-
maybeWaitForSync
protected abstract void maybeWaitForSync(CommitLogSegment.Allocation alloc)
-
shutdown
public void shutdown()
-
syncBlocking
public void syncBlocking()
Request sync and wait until the current state is synced. Note: If a sync is in progress at the time of this request, the call will return after both it and a cycle initiated immediately afterwards complete.
-
awaitTermination
public void awaitTermination() throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
getCompletedTasks
public long getCompletedTasks()
-
getPendingTasks
public long getPendingTasks()
-
-