| Modifier and Type | Class and Description |
|---|---|
| private static class | DiskStorePathManager.DiskstoreNotExclusiveException
Exception class thrown when a diskstore path collides with an existing one |
| private static class | DiskStorePathManager.DiskStorePath
Resolved path and lock details |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | AUTO_DISK_PATH_DIRECTORY_PREFIX
If the CacheManager needs to resolve a conflict with the disk path, it will create a subdirectory in the given disk path with this prefix followed by a number. |
| private final boolean | |
| private static final int | |
| private static final char | |
| private static final Set | |
| private final File | |
| private static final String | |
| private static final Logger | |
| private volatile DiskStorePathManager. |
| Access | Constructor and Description |
|---|---|
| public | DiskStorePathManager(String
diskstore path on disk initialPath)Create a diskstore path manager with provided initial path. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| public File | |
| public File | |
| public boolean | |
| public boolean | |
| public synchronized void | releaseLock()
release the lock file used for collision detection should be called when cache manager shutdowns |
| public boolean | Returns: true if the file existed and the path was successfully lockedfile to check for file)Resolve and lock this disk store path if the resultant path contains the supplied file. |
| private void | |
| private static String |
| AUTO_DISK_PATH_DIRECTORY_PREFIX | back to summary |
|---|---|
| private static final String AUTO_DISK_PATH_DIRECTORY_PREFIX If the CacheManager needs to resolve a conflict with the disk path, it will create a subdirectory in the given disk path with this prefix followed by a number. The presence of this name is used to determined whether it makes sense for a persistent DiskStore to be loaded. Loading persistent DiskStores will only have useful semantics where the diskStore path has not changed. | |
| defaultPath | back to summary |
|---|---|
| private final boolean defaultPath | |
| DEL | back to summary |
|---|---|
| private static final int DEL | |
| ESCAPE | back to summary |
|---|---|
| private static final char ESCAPE | |
| ILLEGALS | back to summary |
|---|---|
| private static final Set<Character> ILLEGALS | |
| initialPath | back to summary |
|---|---|
| private final File initialPath | |
| LOCK_FILE_NAME | back to summary |
|---|---|
| private static final String LOCK_FILE_NAME | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| path | back to summary |
|---|---|
| private volatile DiskStorePathManager. | |
| DiskStorePathManager | back to summary |
|---|---|
| public DiskStorePathManager(String initialPath) Create a diskstore path manager with provided initial path.
| |
| DiskStorePathManager | back to summary |
|---|---|
| public DiskStorePathManager() Create a diskstore path manager using the default path. | |
| deleteFile | back to summary |
|---|---|
| private static void deleteFile(File f) | |
| getFile | back to summary |
|---|---|
| public File getFile(String cacheName, String suffix) Get a file object for the given cache-name and suffix | |
| getFile | back to summary |
|---|---|
| public File getFile(String name) Get a file object for the given name | |
| isAutoCreated | back to summary |
|---|---|
| public boolean isAutoCreated() Was this path auto-created (ie. the result of a collision)
| |
| isDefault | back to summary |
|---|---|
| public boolean isDefault() Was this path sourced from the default value.
| |
| releaseLock | back to summary |
|---|---|
| public synchronized void releaseLock() release the lock file used for collision detection should be called when cache manager shutdowns | |
| resolveAndLockIfExists | back to summary |
|---|---|
| public boolean resolveAndLockIfExists(String file) Resolve and lock this disk store path if the resultant path contains the supplied file.
| |
| resolveAndLockIfNeeded | back to summary |
|---|---|
| private void resolveAndLockIfNeeded(boolean allowAutoCreate) throws DiskstoreNotExclusiveException | |
| safeName | back to summary |
|---|---|
| private static String safeName(String name) sanitize a name for valid file or directory name
| |
| Access | Constructor and Description |
|---|---|
| public | |
| public | DiskstoreNotExclusiveException(String
the exception detail message message)Constructor for the DiskstoreNotExclusiveException object. |
| DiskstoreNotExclusiveException | back to summary |
|---|---|
| public DiskstoreNotExclusiveException() Constructor for the DiskstoreNotExclusiveException object. | |
| DiskstoreNotExclusiveException | back to summary |
|---|---|
| public DiskstoreNotExclusiveException(String message) Constructor for the DiskstoreNotExclusiveException object.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final boolean | |
| private final FileLock | |
| private final File | |
| private final File |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv File | |
| pack-priv File | |
| pack-priv boolean | |
| pack-priv boolean | |
| public String | |
| pack-priv void |
| autoCreated | back to summary |
|---|---|
| private final boolean autoCreated | |
| defaultPath | back to summary |
|---|---|
| private final boolean defaultPath | |
| directoryLock | back to summary |
|---|---|
| private final FileLock directoryLock | |
| diskStorePath | back to summary |
|---|---|
| private final File diskStorePath | |
| lockFile | back to summary |
|---|---|
| private final File lockFile | |
| DiskStorePath | back to summary |
|---|---|
| pack-priv DiskStorePath(File path, boolean autoCreated, boolean defaultPath) throws DiskstoreNotExclusiveException | |
| getDiskStorePath | back to summary |
|---|---|
| pack-priv File getDiskStorePath() | |
| getLockFile | back to summary |
|---|---|
| pack-priv File getLockFile() | |
| isAutoCreated | back to summary |
|---|---|
| pack-priv boolean isAutoCreated() | |
| isDefault | back to summary |
|---|---|
| pack-priv boolean isDefault() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| unlock | back to summary |
|---|---|
| pack-priv void unlock() | |