org.apache.accumulo.fate.zookeeper
public class ZooReaderWriter extends ZooReader implements IZooReaderWriter
Modifier and Type | Class and Description |
---|---|
static interface |
ZooReaderWriter.Mutator |
Constructor and Description |
---|
ZooReaderWriter(String string,
int timeInMillis,
String scheme,
byte[] auth) |
Modifier and Type | Method and Description |
---|---|
void |
delete(String path,
int version) |
static ZooReaderWriter |
getInstance(String zookeepers,
int timeInMillis,
String scheme,
byte[] auth) |
static IZooReaderWriter |
getRetryingInstance(String zookeepers,
int timeInMillis,
String scheme,
byte[] auth)
get an instance that retries when zookeeper connection errors occur
|
org.apache.zookeeper.ZooKeeper |
getZooKeeper() |
boolean |
isLockHeld(ZooUtil.LockID lockID) |
void |
mkdirs(String path) |
byte[] |
mutate(String zPath,
byte[] createValue,
List<org.apache.zookeeper.data.ACL> acl,
ZooReaderWriter.Mutator mutator) |
String |
putEphemeralData(String zPath,
byte[] data) |
String |
putEphemeralSequential(String zPath,
byte[] data) |
void |
putPersistentData(String zPath,
byte[] data,
int version,
ZooUtil.NodeExistsPolicy policy) |
boolean |
putPersistentData(String zPath,
byte[] data,
ZooUtil.NodeExistsPolicy policy)
Create a persistent node with the default ACL
|
String |
putPersistentSequential(String zPath,
byte[] data) |
boolean |
putPrivatePersistentData(String zPath,
byte[] data,
ZooUtil.NodeExistsPolicy policy) |
void |
recursiveCopyPersistent(String source,
String destination,
ZooUtil.NodeExistsPolicy policy) |
void |
recursiveDelete(String zPath,
ZooUtil.NodeMissingPolicy policy) |
exists, exists, getChildren, getChildren, getData, getSession, getStatus, getStatus, sync
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
sync
exists, exists, getChildren, getChildren, getData, getStatus, getStatus
public org.apache.zookeeper.ZooKeeper getZooKeeper()
getZooKeeper
in interface IZooReaderWriter
getZooKeeper
in class ZooReader
public void recursiveDelete(String zPath, ZooUtil.NodeMissingPolicy policy) throws org.apache.zookeeper.KeeperException, InterruptedException
recursiveDelete
in interface IZooReaderWriter
org.apache.zookeeper.KeeperException
InterruptedException
public boolean putPersistentData(String zPath, byte[] data, ZooUtil.NodeExistsPolicy policy) throws org.apache.zookeeper.KeeperException, InterruptedException
putPersistentData
in interface IZooReaderWriter
org.apache.zookeeper.KeeperException
InterruptedException
public boolean putPrivatePersistentData(String zPath, byte[] data, ZooUtil.NodeExistsPolicy policy) throws org.apache.zookeeper.KeeperException, InterruptedException
putPrivatePersistentData
in interface IZooReaderWriter
org.apache.zookeeper.KeeperException
InterruptedException
public void putPersistentData(String zPath, byte[] data, int version, ZooUtil.NodeExistsPolicy policy) throws org.apache.zookeeper.KeeperException, InterruptedException
putPersistentData
in interface IZooReaderWriter
org.apache.zookeeper.KeeperException
InterruptedException
public String putPersistentSequential(String zPath, byte[] data) throws org.apache.zookeeper.KeeperException, InterruptedException
putPersistentSequential
in interface IZooReaderWriter
org.apache.zookeeper.KeeperException
InterruptedException
public String putEphemeralData(String zPath, byte[] data) throws org.apache.zookeeper.KeeperException, InterruptedException
putEphemeralData
in interface IZooReaderWriter
org.apache.zookeeper.KeeperException
InterruptedException
public String putEphemeralSequential(String zPath, byte[] data) throws org.apache.zookeeper.KeeperException, InterruptedException
putEphemeralSequential
in interface IZooReaderWriter
org.apache.zookeeper.KeeperException
InterruptedException
public void recursiveCopyPersistent(String source, String destination, ZooUtil.NodeExistsPolicy policy) throws org.apache.zookeeper.KeeperException, InterruptedException
recursiveCopyPersistent
in interface IZooReaderWriter
org.apache.zookeeper.KeeperException
InterruptedException
public void delete(String path, int version) throws InterruptedException, org.apache.zookeeper.KeeperException
delete
in interface IZooReaderWriter
InterruptedException
org.apache.zookeeper.KeeperException
public byte[] mutate(String zPath, byte[] createValue, List<org.apache.zookeeper.data.ACL> acl, ZooReaderWriter.Mutator mutator) throws Exception
mutate
in interface IZooReaderWriter
Exception
public static ZooReaderWriter getInstance(String zookeepers, int timeInMillis, String scheme, byte[] auth)
public static IZooReaderWriter getRetryingInstance(String zookeepers, int timeInMillis, String scheme, byte[] auth)
public boolean isLockHeld(ZooUtil.LockID lockID) throws org.apache.zookeeper.KeeperException, InterruptedException
isLockHeld
in interface IZooReaderWriter
org.apache.zookeeper.KeeperException
InterruptedException
public void mkdirs(String path) throws org.apache.zookeeper.KeeperException, InterruptedException
mkdirs
in interface IZooReaderWriter
org.apache.zookeeper.KeeperException
InterruptedException
Copyright © 2015 Apache Accumulo Project. All Rights Reserved.