org.apache.curator.framework.api.transaction
Class CuratorTransactionResult

java.lang.Object
  extended by org.apache.curator.framework.api.transaction.CuratorTransactionResult

public class CuratorTransactionResult
extends Object

Holds the result of one transactional operation


Constructor Summary
CuratorTransactionResult(OperationType type, String forPath, String resultPath, org.apache.zookeeper.data.Stat resultStat)
           
 
Method Summary
 String getForPath()
          Returns the path that was passed to the operation when added
 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, String forPath)
          Utility that can be passed to Google Guava to find a particular result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CuratorTransactionResult

public CuratorTransactionResult(OperationType type,
                                String forPath,
                                String resultPath,
                                org.apache.zookeeper.data.Stat resultStat)
Method Detail

ofTypeAndPath

public static com.google.common.base.Predicate<CuratorTransactionResult> ofTypeAndPath(OperationType type,
                                                                                       String forPath)
Utility that can be passed to Google Guava to find a particular result. E.g.
 Iterables.find(results, CuratorTransactionResult.ofTypeAndPath(OperationType.CREATE, path))
 

Parameters:
type - operation type
forPath - path
Returns:
predicate

getType

public OperationType getType()
Returns the operation type

Returns:
operation type

getForPath

public String getForPath()
Returns the path that was passed to the operation when added

Returns:
operation input path

getResultPath

public String getResultPath()
Returns the operation generated path or null. i.e. CuratorTransaction.create() using an EPHEMERAL mode generates the created path plus its sequence number.

Returns:
generated path or null

getResultStat

public org.apache.zookeeper.data.Stat getResultStat()
Returns the operation generated stat or null. i.e. CuratorTransaction.setData() generates a stat object.

Returns:
generated stat or null


Copyright © 2011–2014 The Apache Software Foundation. All rights reserved.