use of com.ibm.etcd.client.SerializingExecutor in project etcd-java by IBM.
the class PersistentLeaseKey method start.
public synchronized void start() {
if (executor != null)
throw new IllegalStateException("already started");
if (closeFuture != null)
throw new IllegalStateException("closed");
// TODO TBD or have lease expose its response executor
executor = new SerializingExecutor(client.getExecutor());
if (lease == null)
lease = client.getSessionLease();
lease.addStateObserver(stateObserver, true);
}
Aggregations