public static class BrooklynServerPaths.PersistenceBackupPathResolver extends BrooklynServerPaths.PersistencePathResolver
BrooklynServerPaths.PersistencePathResolver, but designed for use for backup subpaths.
If the container is not explicitly specified, "backups" is appended to the defaults from BrooklynServerPaths.PersistencePathResolver.
It also includes conveniences for resolving further subpaths, cf PersistenceBackupPathResolver#resolveWithSubpathFor(ManagementContextInternal, String).
| Modifier and Type | Method and Description |
|---|---|
BrooklynServerPaths.PersistenceBackupPathResolver |
dir(java.lang.String dirOrContainer)
Optional directory (for localhost/filesystem) or container name.
|
BrooklynServerPaths.PersistenceBackupPathResolver |
location(java.lang.String backupLocationSpec)
Optional location spec.
|
BrooklynServerPaths.PersistenceBackupPathResolver |
nonBackupLocation(java.lang.String locationSpec) |
java.lang.String |
resolveWithSubpath(java.lang.String subpath)
Appends a sub-path to the path returned by
BrooklynServerPaths.PersistencePathResolver.resolve() |
java.lang.String |
resolveWithSubpathFor(ManagementContext managementContext,
java.lang.String label)
Appends a standard format subpath sub-path to the path returned by
BrooklynServerPaths.PersistencePathResolver.resolve(). |
resolvepublic BrooklynServerPaths.PersistenceBackupPathResolver nonBackupLocation(@Nullable java.lang.String locationSpec)
public BrooklynServerPaths.PersistenceBackupPathResolver dir(java.lang.String dirOrContainer)
BrooklynServerPaths.PersistencePathResolverBrooklynServerPaths.DEFAULT_PERSISTENCE_DIR_FOR_FILESYSTEM and
BrooklynServerPaths.DEFAULT_PERSISTENCE_CONTAINER_NAME are used.dir in class BrooklynServerPaths.PersistencePathResolverpublic BrooklynServerPaths.PersistenceBackupPathResolver location(java.lang.String backupLocationSpec)
BrooklynServerPaths.PersistencePathResolverBrooklynServerPaths.PersistencePathResolver.resolve() will return a container name suitable for use
with the store, based on the BrooklynServerPaths.PersistencePathResolver.dir(String);
if not supplied, or blank, or localhost this will cause resolution to give a full file system path,
if relative taken with respect to the BrooklynServerPaths.getMgmtBaseDir(ManagementContext).
Config is not looked up for resolving a location spec.location in class BrooklynServerPaths.PersistencePathResolverpublic java.lang.String resolveWithSubpath(java.lang.String subpath)
BrooklynServerPaths.PersistencePathResolver.resolve()public java.lang.String resolveWithSubpathFor(ManagementContext managementContext, java.lang.String label)
BrooklynServerPaths.PersistencePathResolver.resolve().
For example, this might write to:
~/.brooklyn/brooklyn-persisted-state/backups/2014-11-13-1201-n0deId-promotion-sA1t