public abstract class MakeNextDirectory
extends java.lang.Object
ManagedRepositoryI.TemplateDirectoryCreator:
pinpoint the next directory to use, then try to use it while watching for
conflicts from other similar threads.| Constructor and Description |
|---|
MakeNextDirectory() |
| Modifier and Type | Method and Description |
|---|---|
abstract java.util.List<java.lang.String> |
getPathFor(long index)
Get the subdirectories to create for the given index,
the first directories to be created corresponding to
index == 0. |
abstract boolean |
isAcceptable(java.util.List<java.lang.String> path)
If the circumstances (filesystem, etc.) are such that it is okay to use the given subdirectories.
|
java.util.List<java.lang.String> |
useFirstAcceptable()
Use the first acceptable path (that with the lowest
index for getPathFor(long))
and return the corresponding subdirectories. |
abstract void |
usePath(java.util.List<java.lang.String> path)
Actually use the path.
|
public abstract java.util.List<java.lang.String> getPathFor(long index)
index == 0.index - a non-negative indexpublic abstract boolean isAcceptable(java.util.List<java.lang.String> path)
throws ServerError
path - the subdirectories to possibly useServerError - if the path could not be testedpublic abstract void usePath(java.util.List<java.lang.String> path)
throws ServerError
path - the subdirectories to useServerError - if the path could not be usedpublic java.util.List<java.lang.String> useFirstAcceptable()
throws ServerError
index for getPathFor(long))
and return the corresponding subdirectories.ServerError - if the first acceptable path could not be found or used