Package com.couchbase.client.java.kv
Class MutationState
java.lang.Object
com.couchbase.client.java.kv.MutationState
- All Implemented Interfaces:
- Iterable<MutationToken>
Aggregation of one or more 
MutationTokens for specifying
 consistency requirements of N1QL or FTS queries.
 Thread-safe.
- Since:
- 2.3.0
- 
Method SummaryModifier and TypeMethodDescriptionadd(MutationToken... mutationTokens) Add one or moreMutationTokensto thisMutationState.add(MutationState mutationState) Adds all the internal state from the givenMutationStateonto the called one.booleanexport()Exports theMutationStateinto 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.Exports theMutationStateinto a format recognized by the FTS search engine.static MutationStatefrom(MutationToken... mutationTokens) Create aMutationStatefrom one or moreMutationTokens.static MutationStatefrom(JsonObject source) Create aMutationStatefrom the serialized state.static MutationStateCreate aMutationStatefrom the serialized state.inthashCode()iterator()toString()Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Method Details- 
fromCreate aMutationStatefrom one or moreMutationTokens.- Parameters:
- mutationTokens- the mutation tokens.
- Returns:
- the initialized MutationState.
 
- 
addAdd one or moreMutationTokensto thisMutationState.- Parameters:
- mutationTokens- the tokens
- Returns:
- the modified MutationState.
 
- 
addAdds all the internal state from the givenMutationStateonto the called one.- Parameters:
- mutationState- the state from which the tokens are applied from.
- Returns:
- the modified MutationState.
 
- 
iterator- Specified by:
- iteratorin interface- Iterable<MutationToken>
 
- 
exportExports theMutationStateinto 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.
 
- 
exportForSearchExports theMutationStateinto a format recognized by the FTS search engine.- Returns:
- the exported JsonObjectfor one FTS index.
 
- 
fromCreate aMutationStatefrom the serialized state.- Parameters:
- source- the source state, serialized.
- Returns:
- the created MutationState.
 
- 
fromCreate aMutationStatefrom the serialized state.- Parameters:
- source- the source state, serialized.
- Returns:
- the created MutationState.
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-