Search in sources :

Example 1 with SerializingExecutor

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);
}
Also used : SerializingExecutor(com.ibm.etcd.client.SerializingExecutor)

Aggregations

SerializingExecutor (com.ibm.etcd.client.SerializingExecutor)1