public class SynchronizedStateStorage extends Object
Manages the state of background BackgroundTask in
a synchronized manner withing a cluster. This means that all updates must be performed
by acquiring a distributed mutex so that no concurrent writes are possible.
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.apache.curator.framework.CuratorFramework |
connection() |
static SynchronizedStateStorage |
getInstance() |
SynchronizedState |
getState(String id) |
void |
newState(String id,
TaskStatus status,
String engineID,
String checkpoint) |
Boolean |
updateState(String id,
TaskStatus status,
String engineID,
String checkpoint) |
public static SynchronizedStateStorage getInstance() throws Exception
Exceptionpublic org.apache.curator.framework.CuratorFramework connection()
public void close()
public void newState(String id, TaskStatus status, String engineID, String checkpoint) throws Exception
Exceptionpublic Boolean updateState(String id, TaskStatus status, String engineID, String checkpoint)
public SynchronizedState getState(String id)
Copyright © 2017 Grakn Labs Ltd. All rights reserved.