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 omero.ServerError
path
- the subdirectories to possibly useomero.ServerError
- if the path could not be testedpublic abstract void usePath(java.util.List<java.lang.String> path) throws omero.ServerError
path
- the subdirectories to useomero.ServerError
- if the path could not be usedpublic java.util.List<java.lang.String> useFirstAcceptable() throws omero.ServerError
index
for getPathFor(long)
)
and return the corresponding subdirectories.omero.ServerError
- if the first acceptable path could not be found or used
Version: 5.4.4-ice35-b82
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.