|
VolD 0.1
|
The VolD REST based client api. More...
Inheritance diagram for de.zib.vold.client.RESTClient:
Collaboration diagram for de.zib.vold.client.RESTClient:Public Member Functions | |
| RESTClient () | |
| Construct an uninitialized RESTClient. | |
| RESTClient (String baseURL) | |
| Construct a RESTClient with all necessary informations. | |
| void | setBaseURL (String baseURL) |
| Set the URL of the remote REST based VolD service. | |
| void | setEnc (String enc) |
| Set the encoding used to encode all keys. | |
| void | checkState () |
| Check the state of the object. | |
| Map< String, String > | insert (String source, Map< Key, Set< String > > map) |
| Insert a set of keys. | |
| Map< String, String > | refresh (String source, Set< Key > set) |
| Refresh a set of keys. | |
| Map< String, String > | delete (String source, Set< Key > set) |
| Delete a set of keys. | |
| Map< Key, Set< String > > | lookup (Set< Key > keys) |
| Query a set of keys. | |
| Map< String, String > | insert (String source, Key key, Set< String > values) |
| Insert a single key. | |
| Map< Key, Set< String > > | lookup (Key key) |
| Query a key. | |
Protected Attributes | |
| final Logger | log = LoggerFactory.getLogger( this.getClass() ) |
Private Member Functions | |
| String | getGreatestCommonPrefix (Collection< String > words) |
| Get the largest prefix shared by a set of words. | |
| String | getCommonPrefix (String a, String b) |
| Get the greatest common prefix of two strings. | |
| String | buildURI (Collection< Key > keys) |
| Build a URI requesting a set of keys from the remote VolD. | |
Private Attributes | |
| String | baseURL |
| ApplicationContext | context |
| RestTemplate | rest |
| String | enc = "utf-8" |
The VolD REST based client api.
Definition at line 33 of file RESTClient.java.
| de.zib.vold.client.RESTClient.RESTClient | ( | ) |
Construct an uninitialized RESTClient.
Definition at line 47 of file RESTClient.java.
References de.zib.vold.client.RESTClient.baseURL, de.zib.vold.client.RESTClient.context, and de.zib.vold.client.RESTClient.rest.
| de.zib.vold.client.RESTClient.RESTClient | ( | String | baseURL | ) |
Construct a RESTClient with all necessary informations.
| baseURL | The URL of the remote REST based VolD service. |
Definition at line 65 of file RESTClient.java.
References de.zib.vold.client.RESTClient.baseURL, de.zib.vold.client.RESTClient.context, and de.zib.vold.client.RESTClient.rest.
| String de.zib.vold.client.RESTClient.buildURI | ( | Collection< Key > | keys | ) | [private] |
Build a URI requesting a set of keys from the remote VolD.
| keys | The set of keys to request. |
Definition at line 486 of file RESTClient.java.
References de.zib.vold.client.RESTClient.baseURL.
Referenced by de.zib.vold.client.RESTClient.delete(), de.zib.vold.client.RESTClient.insert(), de.zib.vold.client.RESTClient.lookup(), and de.zib.vold.client.RESTClient.refresh().
Here is the caller graph for this function:| void de.zib.vold.client.RESTClient.checkState | ( | ) |
Check the state of the object.
Definition at line 99 of file RESTClient.java.
References de.zib.vold.client.RESTClient.baseURL.
Referenced by de.zib.vold.replication.RESTVoldReplicator.checkState(), de.zib.vold.client.RESTClient.delete(), de.zib.vold.client.RESTClient.insert(), de.zib.vold.client.RESTClient.lookup(), and de.zib.vold.client.RESTClient.refresh().
Here is the caller graph for this function:| Map< String, String > de.zib.vold.client.RESTClient.delete | ( | String | source, |
| Set< Key > | set | ||
| ) |
Delete a set of keys.
| source | The source of the keys to delete. |
| set | The set of keys to delete. |
Implements de.zib.vold.common.VoldInterface.
Definition at line 266 of file RESTClient.java.
References de.zib.vold.client.RESTClient.baseURL, de.zib.vold.client.RESTClient.buildURI(), de.zib.vold.client.RESTClient.checkState(), de.zib.vold.client.RESTClient.enc, de.zib.vold.common.Key.get_keyname(), de.zib.vold.common.Key.get_scope(), de.zib.vold.common.Key.get_type(), de.zib.vold.client.RESTClient.getGreatestCommonPrefix(), de.zib.vold.client.RESTClient.log, de.zib.vold.client.RESTClient.rest, and de.zib.vold.common.URIKey.toURIString().
Here is the call graph for this function:| String de.zib.vold.client.RESTClient.getCommonPrefix | ( | String | a, |
| String | b | ||
| ) | [private] |
Get the greatest common prefix of two strings.
| a | A string. |
| b | A string. |
Definition at line 462 of file RESTClient.java.
Referenced by de.zib.vold.client.RESTClient.getGreatestCommonPrefix().
Here is the caller graph for this function:| String de.zib.vold.client.RESTClient.getGreatestCommonPrefix | ( | Collection< String > | words | ) | [private] |
Get the largest prefix shared by a set of words.
| words | The set of words to get the largest prefix from. |
Definition at line 438 of file RESTClient.java.
References de.zib.vold.client.RESTClient.getCommonPrefix().
Referenced by de.zib.vold.client.RESTClient.delete(), de.zib.vold.client.RESTClient.insert(), and de.zib.vold.client.RESTClient.refresh().
Here is the call graph for this function:
Here is the caller graph for this function:| Map< String, String > de.zib.vold.client.RESTClient.insert | ( | String | source, |
| Key | key, | ||
| Set< String > | values | ||
| ) |
Insert a single key.
| source | The source of the key. |
| key | The key to store. |
| values | The values associated with the key. |
Definition at line 412 of file RESTClient.java.
References de.zib.vold.client.RESTClient.insert().
Here is the call graph for this function:| Map< String, String > de.zib.vold.client.RESTClient.insert | ( | String | source, |
| Map< Key, Set< String > > | map | ||
| ) |
Insert a set of keys.
Implements de.zib.vold.common.VoldInterface.
Definition at line 111 of file RESTClient.java.
References de.zib.vold.client.RESTClient.baseURL, de.zib.vold.client.RESTClient.buildURI(), de.zib.vold.client.RESTClient.checkState(), de.zib.vold.client.RESTClient.enc, de.zib.vold.client.RESTClient.getGreatestCommonPrefix(), de.zib.vold.client.RESTClient.log, de.zib.vold.client.RESTClient.rest, and de.zib.vold.common.URIKey.toURIString().
Referenced by de.zib.vold.replication.RESTVoldReplicator.insert(), and de.zib.vold.client.RESTClient.insert().
Here is the call graph for this function:
Here is the caller graph for this function:Query a key.
| key | the key to lookup. |
Definition at line 425 of file RESTClient.java.
References de.zib.vold.client.RESTClient.lookup().
Here is the call graph for this function:Query a set of keys.
| keys | The set of keys to query |
Implements de.zib.vold.common.VoldInterface.
Definition at line 342 of file RESTClient.java.
References de.zib.vold.client.RESTClient.baseURL, de.zib.vold.client.RESTClient.buildURI(), de.zib.vold.client.RESTClient.checkState(), de.zib.vold.client.RESTClient.log, and de.zib.vold.client.RESTClient.rest.
Referenced by de.zib.vold.client.RESTClient.lookup().
Here is the call graph for this function:
Here is the caller graph for this function:| Map< String, String > de.zib.vold.client.RESTClient.refresh | ( | String | source, |
| Set< Key > | set | ||
| ) |
Refresh a set of keys.
| source | The source of the keys. |
| set | The set keys to refresh. |
Implements de.zib.vold.common.VoldInterface.
Definition at line 190 of file RESTClient.java.
References de.zib.vold.client.RESTClient.baseURL, de.zib.vold.client.RESTClient.buildURI(), de.zib.vold.client.RESTClient.checkState(), de.zib.vold.client.RESTClient.enc, de.zib.vold.common.Key.get_keyname(), de.zib.vold.common.Key.get_scope(), de.zib.vold.common.Key.get_type(), de.zib.vold.client.RESTClient.getGreatestCommonPrefix(), de.zib.vold.client.RESTClient.log, de.zib.vold.client.RESTClient.rest, and de.zib.vold.common.URIKey.toURIString().
Referenced by de.zib.vold.replication.RESTVoldReplicator.refresh().
Here is the call graph for this function:
Here is the caller graph for this function:| void de.zib.vold.client.RESTClient.setBaseURL | ( | String | baseURL | ) |
Set the URL of the remote REST based VolD service.
| baseURL | The remote URL of VolD. |
Definition at line 83 of file RESTClient.java.
References de.zib.vold.client.RESTClient.baseURL.
Referenced by de.zib.vold.replication.RESTVoldReplicator.setBaseURL().
Here is the caller graph for this function:| void de.zib.vold.client.RESTClient.setEnc | ( | String | enc | ) |
Set the encoding used to encode all keys.
Definition at line 91 of file RESTClient.java.
References de.zib.vold.client.RESTClient.enc.
String de.zib.vold.client.RESTClient.baseURL [private] |
Definition at line 37 of file RESTClient.java.
Referenced by de.zib.vold.client.RESTClient.buildURI(), de.zib.vold.client.RESTClient.checkState(), de.zib.vold.client.RESTClient.delete(), de.zib.vold.client.RESTClient.insert(), de.zib.vold.client.RESTClient.lookup(), de.zib.vold.client.RESTClient.refresh(), de.zib.vold.client.RESTClient.RESTClient(), and de.zib.vold.client.RESTClient.setBaseURL().
ApplicationContext de.zib.vold.client.RESTClient.context [private] |
Definition at line 39 of file RESTClient.java.
Referenced by de.zib.vold.client.RESTClient.RESTClient().
String de.zib.vold.client.RESTClient.enc = "utf-8" [private] |
Definition at line 42 of file RESTClient.java.
Referenced by de.zib.vold.client.RESTClient.delete(), de.zib.vold.client.RESTClient.insert(), de.zib.vold.client.RESTClient.refresh(), and de.zib.vold.client.RESTClient.setEnc().
final Logger de.zib.vold.client.RESTClient.log = LoggerFactory.getLogger( this.getClass() ) [protected] |
Definition at line 35 of file RESTClient.java.
Referenced by de.zib.vold.client.RESTClient.delete(), de.zib.vold.client.RESTClient.insert(), de.zib.vold.client.RESTClient.lookup(), and de.zib.vold.client.RESTClient.refresh().
RestTemplate de.zib.vold.client.RESTClient.rest [private] |
Definition at line 40 of file RESTClient.java.
Referenced by de.zib.vold.client.RESTClient.delete(), de.zib.vold.client.RESTClient.insert(), de.zib.vold.client.RESTClient.lookup(), de.zib.vold.client.RESTClient.refresh(), and de.zib.vold.client.RESTClient.RESTClient().