|
VolD 0.1
|
The Frontend used by the user interfaces for VolD. More...
Collaboration diagram for de.zib.vold.frontend.Frontend:Public Member Functions | |
| Frontend () | |
| Construct an uninitialized Frontend. | |
| void | setVolatileDirectory (VolatileDirectory volatileDirectory) |
| Set the volatile directory to store the informations in. | |
| boolean | getRecursiveScopeLookups () |
| Are recursive scope lookups enabled? | |
| void | setRecursiveScopeLookups (boolean recursiveScopeLookups) |
| Enable/disable recursive scope lookups. | |
| boolean | getPrefixLookupsAllowed () |
| Are prefix lookups allowed? | |
| void | setPrefixLookupsAllowed (boolean prefixLookupsAllowed) |
| (Do not) allow prefix lookups. | |
| void | insert (String source, Key key, Set< String > value) |
| Insert a key. | |
| void | refresh (String source, Key key) |
| Refresh a key. | |
| void | delete (String source, Key key) |
| Delete a key. | |
| Map< Key, Set< String > > | lookup (Key key) |
| Lookup the specified key. | |
Protected Member Functions | |
| void | checkState () |
| Internal method which acts as part of the guard of all public methods. | |
Package Attributes | |
| final String | scopeDelimiter = "/" |
Private Member Functions | |
| String | prepare_prefix_key (String key) |
| Prepare key for (prefix-) lookup. | |
| String | scope_base (String scope) |
| Get the parent of a scope. | |
| Map< Key, Set< String > > | scopeLookup (Key key) |
| Lookup the specified key only in the given scope. | |
Private Attributes | |
| final ReentrantReadWriteLock | rwlock |
| VolatileDirectory | volatileDirectory |
| boolean | recursiveScopeLookups |
| boolean | prefixLookupsAllowed |
Static Private Attributes | |
| static final Logger | log = LoggerFactory.getLogger( Frontend.class ) |
The Frontend used by the user interfaces for VolD.
This class implements the key/value logic offered by VolD: Each key stored on the volatile directory is associated with a source. When a key will be inserted from two different sources, a lookup for that key will result in the merged set of values. A Deletion or freshening of a key is associated with a certain source, thus just a part of the values will deleted or renewed.
Definition at line 30 of file Frontend.java.
| de.zib.vold.frontend.Frontend.Frontend | ( | ) |
Construct an uninitialized Frontend.
Definition at line 46 of file Frontend.java.
References de.zib.vold.frontend.Frontend.rwlock, de.zib.vold.frontend.Frontend.setPrefixLookupsAllowed(), de.zib.vold.frontend.Frontend.setRecursiveScopeLookups(), and de.zib.vold.frontend.Frontend.volatileDirectory.
Here is the call graph for this function:| void de.zib.vold.frontend.Frontend.checkState | ( | ) | [protected] |
Internal method which acts as part of the guard of all public methods.
Definition at line 107 of file Frontend.java.
References de.zib.vold.frontend.Frontend.volatileDirectory.
Referenced by de.zib.vold.frontend.Frontend.delete(), de.zib.vold.frontend.Frontend.insert(), de.zib.vold.frontend.Frontend.lookup(), and de.zib.vold.frontend.Frontend.refresh().
Here is the caller graph for this function:| void de.zib.vold.frontend.Frontend.delete | ( | String | source, |
| Key | key | ||
| ) |
Delete a key.
| source | The source for which the key should be deleted. |
| key | The key to delete. |
Definition at line 205 of file Frontend.java.
References de.zib.vold.frontend.Frontend.checkState(), de.zib.vold.volatilelogic.SlicedDirectory.delete(), de.zib.vold.frontend.Frontend.log, de.zib.vold.frontend.Frontend.rwlock, and de.zib.vold.frontend.Frontend.volatileDirectory.
Referenced by de.zib.vold.userInterface.RESTController.post().
Here is the call graph for this function:
Here is the caller graph for this function:| boolean de.zib.vold.frontend.Frontend.getPrefixLookupsAllowed | ( | ) |
Are prefix lookups allowed?
Definition at line 88 of file Frontend.java.
References de.zib.vold.frontend.Frontend.prefixLookupsAllowed.
Referenced by de.zib.vold.frontend.Frontend.scopeLookup().
Here is the caller graph for this function:| boolean de.zib.vold.frontend.Frontend.getRecursiveScopeLookups | ( | ) |
Are recursive scope lookups enabled?
Definition at line 68 of file Frontend.java.
References de.zib.vold.frontend.Frontend.recursiveScopeLookups.
Referenced by de.zib.vold.frontend.Frontend.lookup().
Here is the caller graph for this function:| void de.zib.vold.frontend.Frontend.insert | ( | String | source, |
| Key | key, | ||
| Set< String > | value | ||
| ) |
Insert a key.
| source | The source where the key comes from. |
| key | The key to insert. |
| value | The values associated with that key. |
Definition at line 145 of file Frontend.java.
References de.zib.vold.common.Key._buildkey(), de.zib.vold.frontend.Frontend.checkState(), de.zib.vold.volatilelogic.SimpleDirectory.insert(), de.zib.vold.frontend.Frontend.log, de.zib.vold.frontend.Frontend.rwlock, and de.zib.vold.frontend.Frontend.volatileDirectory.
Referenced by de.zib.vold.userInterface.ABI.main(), and de.zib.vold.userInterface.RESTController.post().
Here is the call graph for this function:
Here is the caller graph for this function:Lookup the specified key.
If recursive lookups are enabled , the key will be searched recursive to the root scope until one is found. If prefix lookups are enabled, the suffix "..." indicates a prefix lookup. Lists for search keys given by different hosts are merged.
Definition at line 238 of file Frontend.java.
References de.zib.vold.common.Key._buildkey(), de.zib.vold.frontend.Frontend.checkState(), de.zib.vold.common.Key.get_keyname(), de.zib.vold.common.Key.get_scope(), de.zib.vold.common.Key.get_type(), de.zib.vold.frontend.Frontend.getRecursiveScopeLookups(), de.zib.vold.frontend.Frontend.log, de.zib.vold.frontend.Frontend.rwlock, de.zib.vold.frontend.Frontend.scope_base(), de.zib.vold.frontend.Frontend.scopeLookup(), and de.zib.vold.common.Key.toString().
Referenced by de.zib.vold.userInterface.RESTController.get(), and de.zib.vold.userInterface.ABI.main().
Here is the call graph for this function:
Here is the caller graph for this function:| String de.zib.vold.frontend.Frontend.prepare_prefix_key | ( | String | key | ) | [private] |
Prepare key for (prefix-) lookup.
Removes three dots at the end if they are appended.
Definition at line 120 of file Frontend.java.
Referenced by de.zib.vold.frontend.Frontend.scopeLookup().
Here is the caller graph for this function:| void de.zib.vold.frontend.Frontend.refresh | ( | String | source, |
| Key | key | ||
| ) |
Refresh a key.
| source | The source for which the keys timestamp should be updated. |
| key | The key to refresh. |
Definition at line 175 of file Frontend.java.
References de.zib.vold.common.Key._buildkey(), de.zib.vold.frontend.Frontend.checkState(), de.zib.vold.frontend.Frontend.log, de.zib.vold.volatilelogic.SimpleDirectory.refresh(), de.zib.vold.frontend.Frontend.rwlock, and de.zib.vold.frontend.Frontend.volatileDirectory.
Referenced by de.zib.vold.userInterface.RESTController.post().
Here is the call graph for this function:
Here is the caller graph for this function:| String de.zib.vold.frontend.Frontend.scope_base | ( | String | scope | ) | [private] |
Get the parent of a scope.
| scope | The scope to get the parent for. |
Definition at line 304 of file Frontend.java.
References de.zib.vold.frontend.Frontend.scopeDelimiter.
Referenced by de.zib.vold.frontend.Frontend.lookup().
Here is the caller graph for this function:Lookup the specified key only in the given scope.
If prefix lookups are enabled, the suffix "..." indicates a prefix lookup. Lists for Keys given by different hosts are merged;
| VoldException |
Definition at line 323 of file Frontend.java.
References de.zib.vold.common.Key._buildkey(), de.zib.vold.common.Key.buildkey(), de.zib.vold.common.Key.get_keyname(), de.zib.vold.common.Key.get_scope(), de.zib.vold.common.Key.get_type(), de.zib.vold.frontend.Frontend.getPrefixLookupsAllowed(), de.zib.vold.frontend.Frontend.log, de.zib.vold.volatilelogic.SimpleDirectory.prefixLookup(), de.zib.vold.frontend.Frontend.prepare_prefix_key(), and de.zib.vold.frontend.Frontend.volatileDirectory.
Referenced by de.zib.vold.frontend.Frontend.lookup().
Here is the call graph for this function:
Here is the caller graph for this function:| void de.zib.vold.frontend.Frontend.setPrefixLookupsAllowed | ( | boolean | prefixLookupsAllowed | ) |
(Do not) allow prefix lookups.
Prefix lookups are indicated by appending three dots ("...") to the key, searched for.
Definition at line 99 of file Frontend.java.
References de.zib.vold.frontend.Frontend.prefixLookupsAllowed.
Referenced by de.zib.vold.frontend.Frontend.Frontend().
Here is the caller graph for this function:| void de.zib.vold.frontend.Frontend.setRecursiveScopeLookups | ( | boolean | recursiveScopeLookups | ) |
Enable/disable recursive scope lookups.
When recursive scope lookups are enabled, a key will be searched not only in the given scope but also in each parent directory, until a result has been found.
Definition at line 80 of file Frontend.java.
References de.zib.vold.frontend.Frontend.recursiveScopeLookups.
Referenced by de.zib.vold.frontend.Frontend.Frontend().
Here is the caller graph for this function:| void de.zib.vold.frontend.Frontend.setVolatileDirectory | ( | VolatileDirectory | volatileDirectory | ) |
Set the volatile directory to store the informations in.
Definition at line 60 of file Frontend.java.
References de.zib.vold.frontend.Frontend.volatileDirectory.
final Logger de.zib.vold.frontend.Frontend.log = LoggerFactory.getLogger( Frontend.class ) [static, private] |
Definition at line 32 of file Frontend.java.
Referenced by de.zib.vold.frontend.Frontend.delete(), de.zib.vold.frontend.Frontend.insert(), de.zib.vold.frontend.Frontend.lookup(), de.zib.vold.frontend.Frontend.refresh(), and de.zib.vold.frontend.Frontend.scopeLookup().
boolean de.zib.vold.frontend.Frontend.prefixLookupsAllowed [private] |
Definition at line 41 of file Frontend.java.
Referenced by de.zib.vold.frontend.Frontend.getPrefixLookupsAllowed(), and de.zib.vold.frontend.Frontend.setPrefixLookupsAllowed().
boolean de.zib.vold.frontend.Frontend.recursiveScopeLookups [private] |
Definition at line 40 of file Frontend.java.
Referenced by de.zib.vold.frontend.Frontend.getRecursiveScopeLookups(), and de.zib.vold.frontend.Frontend.setRecursiveScopeLookups().
final ReentrantReadWriteLock de.zib.vold.frontend.Frontend.rwlock [private] |
Definition at line 33 of file Frontend.java.
Referenced by de.zib.vold.frontend.Frontend.delete(), de.zib.vold.frontend.Frontend.Frontend(), de.zib.vold.frontend.Frontend.insert(), de.zib.vold.frontend.Frontend.lookup(), and de.zib.vold.frontend.Frontend.refresh().
final String de.zib.vold.frontend.Frontend.scopeDelimiter = "/" [package] |
Definition at line 37 of file Frontend.java.
Referenced by de.zib.vold.frontend.Frontend.scope_base().
Definition at line 35 of file Frontend.java.
Referenced by de.zib.vold.frontend.Frontend.checkState(), de.zib.vold.frontend.Frontend.delete(), de.zib.vold.frontend.Frontend.Frontend(), de.zib.vold.frontend.Frontend.insert(), de.zib.vold.frontend.Frontend.refresh(), de.zib.vold.frontend.Frontend.scopeLookup(), and de.zib.vold.frontend.Frontend.setVolatileDirectory().