@ThreadSafe public abstract class FsDecoratingManager extends FsAbstractManager
Modifier and Type | Field and Description |
---|---|
protected FsManager |
manager
The decorated file system manager.
|
Modifier | Constructor and Description |
---|---|
protected |
FsDecoratingManager(FsManager manager) |
Modifier and Type | Method and Description |
---|---|
<X extends Exception,V extends net.java.truecommons.shed.Visitor<? super FsController,X>> |
accept(net.java.truecommons.shed.Filter<? super FsController> filter,
V visitor)
Filters all managed file system controllers using the given
filter and accepts the given visitor to them. |
FsController |
controller(FsCompositeDriver driver,
FsMountPoint mountPoint)
Returns the thread-safe file system controller for the given mount point.
|
FsController |
newController(FsArchiveDriver<? extends FsArchiveEntry> context,
FsModel model,
FsController parent)
Returns a new file system controller for the mount point of the
given file system model.
|
FsModel |
newModel(FsDriver context,
FsMountPoint mountPoint,
FsModel parent)
Returns a new file system model for the given mount point.
|
String |
toString()
Returns a string representation of this object for debugging and logging
purposes.
|
protected final FsManager manager
protected FsDecoratingManager(FsManager manager)
public <X extends Exception,V extends net.java.truecommons.shed.Visitor<? super FsController,X>> V accept(net.java.truecommons.shed.Filter<? super FsController> filter, V visitor) throws X extends Exception
FsManager
filter
and accepts the given visitor
to them.filter
- the filter for the managed file system controllers.
Calls to its Filter.accept(Object)
method should terminate
quickly without an exception and must not have any side effects on
the given controllers!visitor
- the visitor of the filtered file system controllers.
Calls to its Visitor.visit(Object)
method may have side
effects on the given controllers, e.g. by calling
FsController.sync(BitField)
.visitor
X
- at the discretion of the given visitor.
Throwing this exception aborts the visiting.X extends Exception
public FsController controller(FsCompositeDriver driver, FsMountPoint mountPoint)
FsManager
synchronization
.driver
- the composite file system driver which shall get used to
create a new file system controller if required.mountPoint
- the mount point of the file system.public FsController newController(FsArchiveDriver<? extends FsArchiveEntry> context, FsModel model, @Nullable FsController parent)
FsController.Factory
When called, you may assert the following precondition:
assert null == parent
? null == model.getParent()
: parent.getModel().equals(model.getParent())
context
- the calling context.model
- the file system model.parent
- the nullable parent file system controller.public FsModel newModel(FsDriver context, FsMountPoint mountPoint, FsModel parent)
FsModel.Factory
When called, you may assert the following precondition:
assert null == parent
? null == mountPoint.getParent()
: parent.getMountPoint().equals(mountPoint.getParent());
context
- the calling context.mountPoint
- the mount point of the file system.parent
- the nullable parent file system model.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.