com.basho.riak.client.http.request
Class RiakWalkSpec
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<com.basho.riak.client.http.request.RiakWalkSpecStep>
com.basho.riak.client.http.request.RiakWalkSpec
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable<com.basho.riak.client.http.request.RiakWalkSpecStep>, Collection<com.basho.riak.client.http.request.RiakWalkSpecStep>, List<com.basho.riak.client.http.request.RiakWalkSpecStep>, RandomAccess
public class RiakWalkSpec
- extends ArrayList<com.basho.riak.client.http.request.RiakWalkSpecStep>
Tool for building Riak/Jaywalker specs. Using this class to specify walk
specs ensures that bucket and tag names will be properly URL-escaped.
- Version:
- 0.1
- Author:
- Bryan Fink
- See Also:
- Serialized Form
Constructor Summary |
RiakWalkSpec()
Create an empty Riak walk spec. |
Method Summary |
void |
addStep(String bucket,
String tag)
Append a step to this walk spec, and take the default option for the
accumulate flag. |
void |
addStep(String bucket,
String tag,
boolean accumulateFlag)
Append a step to this walk spec. |
void |
addStep(String bucket,
String tag,
String accumulateFlag)
Append a step to this walk spec. |
String |
toString()
Convert this walk step to a string. |
Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
WILDCARD
public static final String WILDCARD
- The "don't care" signifier. Pass this as the bucket, tag, or accumulate
flag to select the default, or match-all option.
- See Also:
- Constant Field Values
RiakWalkSpec
public RiakWalkSpec()
- Create an empty Riak walk spec.
addStep
public void addStep(String bucket,
String tag,
String accumulateFlag)
- Append a step to this walk spec.
- Parameters:
bucket
- The bucket of the step, or the wildcard.tag
- The tag of the step, or the wildcard.accumulateFlag
- The string "1" to force this step to be accumulated in the
results. "0" to force this step not to be accumulated.
WILDCARD to accept the default accumulation setting ("yes" for
the last step, "no" for all others).
addStep
public void addStep(String bucket,
String tag,
boolean accumulateFlag)
- Append a step to this walk spec. Same as the other addStep function, but
allows the use of a boolean instead of a string for the accumulateFlag
parameter.
addStep
public void addStep(String bucket,
String tag)
- Append a step to this walk spec, and take the default option for the
accumulate flag.
toString
public String toString()
- Convert this walk step to a string. All bucket and tag names will be
URL-escaped in the return value.
- Overrides:
toString
in class AbstractCollection<com.basho.riak.client.http.request.RiakWalkSpecStep>
Copyright © 2012. All Rights Reserved.