public class CuratorTransactionResult
extends java.lang.Object
Constructor and Description |
---|
CuratorTransactionResult(OperationType type,
java.lang.String forPath,
java.lang.String resultPath,
org.apache.zookeeper.data.Stat resultStat) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getForPath()
Returns the path that was passed to the operation when added
|
java.lang.String |
getResultPath()
Returns the operation generated path or
null . |
org.apache.zookeeper.data.Stat |
getResultStat()
Returns the operation generated stat or
null . |
OperationType |
getType()
Returns the operation type
|
static com.google.common.base.Predicate<CuratorTransactionResult> |
ofTypeAndPath(OperationType type,
java.lang.String forPath)
Utility that can be passed to Google Guava to find a particular result.
|
public CuratorTransactionResult(OperationType type, java.lang.String forPath, java.lang.String resultPath, org.apache.zookeeper.data.Stat resultStat)
public static com.google.common.base.Predicate<CuratorTransactionResult> ofTypeAndPath(OperationType type, java.lang.String forPath)
Iterables.find(results, CuratorTransactionResult.ofTypeAndPath(OperationType.CREATE, path))
type
- operation typeforPath
- pathpublic OperationType getType()
public java.lang.String getForPath()
public java.lang.String getResultPath()
null
. i.e. CuratorTransaction.create()
using an EPHEMERAL mode generates the created path plus its sequence number.public org.apache.zookeeper.data.Stat getResultStat()
null
. i.e. CuratorTransaction.setData()
generates a stat object.