
public class DefaultProxyStore extends Object implements ProxyStore
| Constructor and Description |
|---|
DefaultProxyStore()
Construct an empty DefaultProxyStore.
|
DefaultProxyStore(String payload)
Construct a DefaultProxyStore using the a value returned from
encode(). |
| Modifier and Type | Method and Description |
|---|---|
String |
encode()
Return a JSON object literal with the contents of the store.
|
Splittable |
get(String key)
Called by
ProxySerializer to retrieve a value previously provided
to ProxyStore.put(String, Splittable). |
int |
nextId()
Returns a non-negative sequence number.
|
void |
put(String key,
Splittable value)
Called by
ProxySerializer to store a value. |
public DefaultProxyStore()
public DefaultProxyStore(String payload) throws IllegalArgumentException
encode().payload - a String previously returned from encode()IllegalArgumentException - if the payload cannot be parsedpublic String encode()
public Splittable get(String key)
ProxyStoreProxySerializer to retrieve a value previously provided
to ProxyStore.put(String, Splittable).get in interface ProxyStorekey - the keynull if key is unknownpublic int nextId()
ProxyStorenextId in interface ProxyStorepublic void put(String key, Splittable value)
ProxyStoreProxySerializer to store a value.put in interface ProxyStorekey - a key value that will be passed to ProxyStore.get(String)value - the data to storeSplittable.getPayload()Copyright © 2016. All rights reserved.