public interface Lease extends Closeable
InterProcessSemaphore
. It is the client's responsibility
to close this lease when it is no longer needed so that other blocked clients can use it. If the
client crashes (or its session expires, etc.) the lease will automatically be closed.Modifier and Type | Method and Description |
---|---|
void |
close()
Releases the lease so that other clients/processes can acquire it
|
byte[] |
getData()
Return the data stored in the node for this lease
|
String |
getNodeName()
Return the the node for this lease
|
void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
IOException
- errorsbyte[] getData() throws Exception
Exception
- errorsCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.