Package org.apache.curator.framework
Interface CuratorTempFramework
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Implementing Classes:
CuratorTempFrameworkImpl
public interface CuratorTempFramework extends java.io.CloseableTemporary CuratorFramework instances are meant for single requests to ZooKeeper ensembles over a failure prone network such as a WAN. The APIs available from CuratorTempFramework are limited. Further, the connection will be closed after a period of inactivity.
Based on an idea mentioned in a post by Camille Fournier: http://whilefalse.blogspot.com/2012/12/building-global-highly-available.html
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Stop the clientTempGetDataBuildergetData()Start a get data builderCuratorTransactioninTransaction()Start a transaction builder
-
-
-
Method Detail
-
close
void close()
Stop the client- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
inTransaction
CuratorTransaction inTransaction() throws java.lang.Exception
Start a transaction builder- Returns:
- builder object
- Throws:
java.lang.Exception- errors
-
getData
TempGetDataBuilder getData() throws java.lang.Exception
Start a get data builder- Returns:
- builder object
- Throws:
java.lang.Exception- errors
-
-