Package com.couchbase.client.java.kv
Class MutationState
java.lang.Object
com.couchbase.client.java.kv.MutationState
- All Implemented Interfaces:
Iterable<MutationToken>
public class MutationState extends Object implements Iterable<MutationToken>
Aggregation of one or more
MutationToken
into one MutationState
.- Since:
- 2.3.0
- Author:
- Michael Nitschinger
-
Method Summary
Modifier and Type Method Description MutationState
add(MutationToken... mutationTokens)
Add one or moreMutationTokens
to thisMutationState
.MutationState
add(MutationState mutationState)
Adds all the internal state from the givenMutationState
onto the called one.boolean
equals(Object o)
JsonObject
export()
Exports theMutationState
into a universal format, which can be used either to serialize it into a N1QL query or to send it over the network to a different application/SDK.JsonObject
exportForSearch()
Exports theMutationState
into a format recognized by the FTS search engine.static MutationState
from(MutationToken... mutationTokens)
Create aMutationState
from one or moreMutationTokens
.static MutationState
from(JsonObject source)
Create aMutationState
from the serialized state.static MutationState
from(String source)
Create aMutationState
from the serialized state.int
hashCode()
Iterator<MutationToken>
iterator()
String
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
from
Create aMutationState
from one or moreMutationTokens
.- Parameters:
mutationTokens
- the mutation tokens.- Returns:
- the initialized
MutationState
.
-
add
Add one or moreMutationTokens
to thisMutationState
.- Parameters:
mutationTokens
- the tokens- Returns:
- the modified
MutationState
.
-
add
Adds all the internal state from the givenMutationState
onto the called one.- Parameters:
mutationState
- the state from which the tokens are applied from.- Returns:
- the modified
MutationState
.
-
iterator
- Specified by:
iterator
in interfaceIterable<MutationToken>
-
export
Exports theMutationState
into a universal format, which can be used either to serialize it into a N1QL query or to send it over the network to a different application/SDK.- Returns:
- the exported
JsonObject
.
-
exportForSearch
Exports theMutationState
into a format recognized by the FTS search engine.- Returns:
- the exported
JsonObject
for one FTS index.
-
from
Create aMutationState
from the serialized state.- Parameters:
source
- the source state, serialized.- Returns:
- the created
MutationState
.
-
from
Create aMutationState
from the serialized state.- Parameters:
source
- the source state, serialized.- Returns:
- the created
MutationState
.
-
equals
-
hashCode
public int hashCode() -
toString
-