public class MapUpdate extends Object implements DatatypeUpdate
When building an UpdateMap
command
this class is used to encapsulate the update to be performed on a
Riak map datatype. It is a composition of other updates.
Constructor and Description |
---|
MapUpdate()
Construct an empty MapUpdate.
|
Modifier and Type | Method and Description |
---|---|
MapOp |
getOp()
Returns the core update.
|
MapUpdate |
removeCounter(String key)
Update the map in Riak by removing the counter mapped to the provided key.
|
MapUpdate |
removeFlag(String key)
Update the map in Riak by removing the flag mapped to the provided key.
|
MapUpdate |
removeMap(String key)
Update the map in Riak by removing the map mapped to the provided key.
|
MapUpdate |
removeRegister(String key)
Update the map in Riak by removing the register mapped to the provided key.
|
MapUpdate |
removeSet(String key)
Update the map in Riak by removing the set mapped to the provided key.
|
MapUpdate |
update(String key,
CounterUpdate builder)
Update the map in Riak by adding/updating the counter mapped to the provided key.
|
MapUpdate |
update(String key,
FlagUpdate builder)
Update the map in Riak by adding/updating the flag mapped to the provided key.
|
MapUpdate |
update(String key,
MapUpdate builder)
Update the map in Riak by adding/updating the map mapped to the provided key.
|
MapUpdate |
update(String key,
RegisterUpdate builder)
Update the map in Riak by adding/updating the register mapped to the provided key.
|
MapUpdate |
update(String key,
SetUpdate builder)
Update the map in Riak by adding/updating the set mapped to the provided key.
|
public MapUpdate removeCounter(String key)
key
- the key the counter is mapped to.public MapUpdate removeRegister(String key)
key
- the key the register is mapped to.public MapUpdate removeFlag(String key)
key
- the key the flag is mapped to.public MapUpdate removeSet(String key)
key
- the key the set is mapped to.public MapUpdate removeMap(String key)
key
- the key the map is mapped to.public MapUpdate update(String key, MapUpdate builder)
If there is no map referenced by the key, it is created
key
- the key the map is mapped to.builder
- the update to apply to the map the key is mapped to. If none exists it is created.public MapUpdate update(String key, SetUpdate builder)
If there is no set referenced by the key, it is created
key
- the key the set is mapped to.builder
- the update to apply to the set the key is mapped to. If none exists it is created.public MapUpdate update(String key, CounterUpdate builder)
If there is no counter referenced by the key, it is created
key
- the key the set is mapped to.builder
- the update to apply to the counter the key is mapped to. If none exists it is created.public MapUpdate update(String key, RegisterUpdate builder)
If there is no register referenced by the key, it is created
key
- the key the register is mapped to.builder
- the update to apply to the register the key is mapped to. If none exists it is created.public MapUpdate update(String key, FlagUpdate builder)
If there is no flag referenced by the key, it is created
key
- the key the register is mapped to.builder
- the update to apply to the flag the key is mapped to. If none exists it is created.public MapOp getOp()
getOp
in interface DatatypeUpdate
Copyright © 2016. All rights reserved.