@ThreadSafe public abstract class FsManager extends Object implements Iterable<FsController<?>>
Sub-classes must be thread-safe, too.
Constructor and Description |
---|
FsManager() |
Modifier and Type | Method and Description |
---|---|
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 over the controllers of all federated file systems
managed by this instance.
|
void |
sync(BitField<FsSyncOption> options)
Commits all unsynchronized changes to the contents of all federated file
systems managed by this instance to their respective parent file system,
releases the associated resources (e.g.
|
<X extends IOException> |
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,
releases the associated resources (e.g.
|
String |
toString()
Returns a string representation of this object for debugging and logging
purposes.
|
public final boolean equals(Object that)
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 shall get used to
create a new file system controller if required.public abstract int getSize()
public final int hashCode()
equals(java.lang.Object)
.
This can't get overriden.public abstract Iterator<FsController<?>> iterator()
Note that the iterated file system controllers must be ordered so that all file systems appear before any of their parent file systems.
Last, but not least: The iterator must be consistent in multithreaded environments!
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
- a bit field of synchronization options.FsSyncException
- if committing the changes fails for any reason.IllegalArgumentException
- if the combination of synchronization
options is illegal, e.g. if
FsSyncOption.FORCE_CLOSE_INPUT
is cleared and
FsSyncOption.FORCE_CLOSE_OUTPUT
is set or if the
synchronization option FsSyncOption.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
- a bit field of synchronization options.handler
- the exception handling strategy for consuming input
IOException
s and mapping them to output
IOException
s.X
- at the discretion of the exception handler
upon the occurence of any IOException
.IllegalArgumentException
- if the combination of synchronization
options is illegal, e.g. if
FsSyncOption.FORCE_CLOSE_INPUT
is cleared and
FsSyncOption.FORCE_CLOSE_OUTPUT
is set or if the
synchronization option FsSyncOption.ABORT_CHANGES
is set.X extends IOException
Copyright © 2005-2012 Schlichtherle IT Services. All Rights Reserved.