public interface CloneClient
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Destroy this client.
|
void |
connect(String address,
int port)
Connect to a new server endpoint.
|
String |
get(String key)
Look up the value in the shared hashmap.
|
Map<String,String> |
getAll()
Look up all values in the shared hashmap.
|
void |
set(String key,
String value)
Set a new value in the shared hashmap, with no ttl.
|
void |
set(String key,
String value,
long ttl)
Set a new value in the shared hashmap.
|
void |
subscribe(String subtree)
Specify subtree for snapshot and updates.
|
void subscribe(String subtree)
Note: We must do this before connecting to a server as the subtree specification is sent as the first command to the server.
subtree - The prefix (subtree) to subscribe tovoid connect(String address, int port)
address - The address of the server to connect toport - The port on the server to connect tovoid set(String key, String value)
key - The key associated with the new valuevalue - The new value to set in the shared hashmapvoid set(String key, String value, long ttl)
key - The key associated with the new valuevalue - The new value to set in the shared hashmapttl - The time-to-live for the given value, in secondsString get(String key)
key - The key to look upMap<String,String> getAll()
void close()
Copyright © 2019. All rights reserved.