@ThreadSafe public abstract class FsManager extends Object implements Iterable<FsController<?>>
Sub-classes should be thread-safe, too.
FsController
,
FsModel
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 the thread-safe file system controller for the given mount point.
|
abstract int |
getSize()
Returns the number of managed file system controllers.
|
int |
hashCode()
Returns a hash code which is consistent with
equals(java.lang.Object) . |
abstract Iterator<FsController<?>> |
iterator()
Returns an ordered iterator for the managed file system controllers.
|
<E extends FsArchiveEntry> |
newController(FsArchiveDriver<E> driver,
FsModel model,
FsController<?> parent)
Optional:
Returns a new thread-safe archive file system controller.
|
void |
sync(BitField<FsSyncOption> options)
Calls
FsController.sync(BitField) on all managed file system
controllers. |
String |
toString()
Returns a string representation of this object for debugging and logging
purposes.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public final boolean equals(Object that)
public abstract FsController<?> getController(FsMountPoint mountPoint, FsCompositeDriver driver)
synchronization
.mountPoint
- the mount point of the file system.driver
- the composite file system 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()
iterator
in interface Iterable<FsController<?>>
public <E extends FsArchiveEntry> FsController<?> newController(FsArchiveDriver<E> driver, FsModel model, FsController<?> parent)
E
- the type of the archive entries.driver
- the archive driver.model
- the file system model.parent
- the parent file system controller.UnsupportedOperationException
- if this operation is not supported.public void sync(BitField<FsSyncOption> options) throws FsSyncWarningException, FsSyncException
FsController.sync(BitField)
on all managed file system
controllers.
If sync()ing a file system controller fails with an
FsSyncException
, then the exception gets remembered and the loop
continues with sync()ing the remaining file system controllers.
After the loop, the exception(s) get processed for (re)throwing based
on their type and order of appearance.options
- the options for synchronizing the file system.FsSyncWarningException
- if only warning conditions
apply.
This implies that the respective file system controller has been
synchronized with constraints, e.g. if an unclosed archive entry
stream gets forcibly closed.FsSyncException
- if any error conditions apply.IllegalArgumentException
- if the combination of synchronization
options is illegal, e.g. if FsSyncOption.ABORT_CHANGES
is set.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.