public class StandaloneCheckpointIDCounter extends Object implements CheckpointIDCounter
CheckpointIDCounter instances for JobManagers running in RecoveryMode.STANDALONE.
Simple wrapper of an AtomicLong. This is sufficient, because job managers are not
recoverable in this recovery mode.
| Constructor and Description |
|---|
StandaloneCheckpointIDCounter() |
| Modifier and Type | Method and Description |
|---|---|
long |
getAndIncrement()
Atomically increments the current checkpoint ID.
|
void |
setCount(long newCount)
Sets the current checkpoint ID.
|
void |
start()
Starts the
CheckpointIDCounter service. |
void |
stop()
Stops the
CheckpointIDCounter service. |
public void start()
throws Exception
CheckpointIDCounterCheckpointIDCounter service.start in interface CheckpointIDCounterExceptionpublic void stop()
throws Exception
CheckpointIDCounterCheckpointIDCounter service.stop in interface CheckpointIDCounterExceptionpublic long getAndIncrement()
throws Exception
CheckpointIDCountergetAndIncrement in interface CheckpointIDCounterExceptionpublic void setCount(long newCount)
CheckpointIDCountersetCount in interface CheckpointIDCounternewCount - The new IDCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.