|
TrueZIP Kernel 7.0-rc1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.schlichtherle.truezip.fs.FsManager
@ThreadSafe @DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) public abstract class FsManager
An abstract container which manages the life cycle of controllers for federated file systems. A file system is federated if and only if it's a member of a parent (virtual) file system.
Sub-classes must be thread-safe, too.
| Nested Class Summary | |
|---|---|
private static interface |
FsManager.Visitor
A visitor for file system controllers. |
| Field Summary | |
|---|---|
static BitField<FsSyncOption> |
UMOUNT
Equivalent to BitField.of(FsSyncOption.FORCE_CLOSE_INPUT, FsSyncOption.FORCE_CLOSE_OUTPUT, FsSyncOption.CLEAR_CACHE). |
| Constructor Summary | |
|---|---|
FsManager()
|
|
| Method Summary | ||
|---|---|---|
boolean |
equals(Object that)
Two file system managers are considered equal if and only if they are identical. |
|
abstract FsController<?> |
getController(FsMountPoint mountPoint,
FsCompositeDriver driver)
Returns a thread-safe file system controller for the given mount point. |
|
abstract int |
getSize()
Returns the number of federated file systems managed by this instance. |
|
int |
hashCode()
Returns a hash code which is consistent with equals(java.lang.Object). |
|
abstract Iterator<FsController<?>> |
iterator()
Returns an iterator for the controller of all federated file systems managed by this instance. |
|
void |
sync(BitField<FsSyncOption> options)
Commits all unsynchronized changes to the contents of the federated file systems managed by this instance to their respective parent file system. |
|
|
sync(BitField<FsSyncOption> options,
ExceptionHandler<? super IOException,X> handler)
Commits all unsynchronized changes to the contents of all federated file systems managed by this instance to their respective parent file system. |
|
String |
toString()
Returns a string representation of this object for debugging and logging purposes. |
|
private
|
visit(FsManager.Visitor visitor,
ExceptionHandler<? super IOException,X> handler)
Visits the controller of all federated file systems managed by this instance. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final BitField<FsSyncOption> UMOUNT
BitField.of(FsSyncOption.FORCE_CLOSE_INPUT, FsSyncOption.FORCE_CLOSE_OUTPUT, FsSyncOption.CLEAR_CACHE).
| Constructor Detail |
|---|
public FsManager()
| Method Detail |
|---|
public abstract FsController<?> getController(FsMountPoint mountPoint,
FsCompositeDriver driver)
synchronization
operations.
mountPoint - the mount point of the file system.driver - the file system composite driver which will be used to
create a new file system controller if required.
public abstract int getSize()
public abstract Iterator<FsController<?>> iterator()
Important: The iterated file system controllers must be ordered so that all file systems appear before any of their parent file systems.
iterator in interface Iterable<FsController<?>>
public final void sync(BitField<FsSyncOption> options)
throws FsSyncException
This method calls sync(options, builder), where builder is
an instance of FsSyncExceptionBuilder.
If the call succeeds, the builder's AbstractExceptionBuilder.check()
method is called to check out any FsSyncWarningException, too.
options - the synchronization options.
FsSyncException - if committing the changes fails for any reason.
IllegalArgumentException - if the combination of synchronization
options is illegal, e.g. if FORCE_CLOSE_INPUT is cleared
and FORCE_CLOSE_OUTPUT is set or if the synchronization
option ABORT_CHANGES is set.
public <X extends IOException> void sync(BitField<FsSyncOption> options,
ExceptionHandler<? super IOException,X> handler)
throws X extends IOException
X - the type of the IOException to throw at the
discretion of the exception handler.options - the synchronization options.handler - the exception handling strategy for dealing with one or
more input SyncExceptions which may trigger an X.
IOException - at the discretion of the exception handler.
IllegalArgumentException - if the combination of synchronization
options is illegal, e.g. if FORCE_CLOSE_INPUT is cleared
and FORCE_CLOSE_OUTPUT is set or if the synchronization
option ABORT_CHANGES is set.
private <X extends IOException> void visit(FsManager.Visitor visitor,
ExceptionHandler<? super IOException,X> handler)
throws X extends IOException
X - the type of the IOException to throw at the
discretion of the exception handler.visitor - the visitor.handler - the exception handling strategy for dealing with one or
more input SyncExceptions which may trigger an X.
IOException - at the discretion of the exception handler.public final boolean equals(Object that)
equals in class Objectpublic final int hashCode()
equals(java.lang.Object).
This can't get overriden.
hashCode in class Objectpublic String toString()
toString in class Object
|
TrueZIP Kernel 7.0-rc1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||