TrueZIP Kernel 7.0-rc1

de.schlichtherle.truezip.fs
Class FsDecoratingManager<M extends FsManager>

java.lang.Object
  extended by de.schlichtherle.truezip.fs.FsManager
      extended by de.schlichtherle.truezip.fs.FsDecoratingManager<M>
Type Parameters:
M - The type of the file system model.
All Implemented Interfaces:
Iterable<FsController<?>>
Direct Known Subclasses:
FsFailSafeManager, FsFilteringManager, FsStatisticsManager

@ThreadSafe
public abstract class FsDecoratingManager<M extends FsManager>
extends FsManager

An abstract decorator for a file system manager.

Author:
Christian Schlichtherle

Field Summary
protected  M delegate
           
 
Fields inherited from class de.schlichtherle.truezip.fs.FsManager
UMOUNT
 
Constructor Summary
protected FsDecoratingManager(M manager)
          Constructs a new decorating file system manager.
 
Method Summary
 FsController<?> getController(FsMountPoint mountPoint, FsCompositeDriver driver)
          Returns a thread-safe file system controller for the given mount point.
 int getSize()
          Returns the number of federated file systems managed by this instance.
 Iterator<FsController<?>> iterator()
          Returns an iterator for the controller of all federated file systems managed by this instance.
<X extends IOException>
void
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.
 
Methods inherited from class de.schlichtherle.truezip.fs.FsManager
equals, hashCode, sync
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

delegate

protected final M extends FsManager delegate
Constructor Detail

FsDecoratingManager

protected FsDecoratingManager(@NonNull
                              M manager)
Constructs a new decorating file system manager.

Parameters:
manager - the decorated file system manager.
Method Detail

getController

public FsController<?> getController(FsMountPoint mountPoint,
                                     FsCompositeDriver driver)
Description copied from class: FsManager
Returns a thread-safe file system controller for the given mount point. If and only if the given mount point addresses a federated file system, the returned file system controller is remembered for life cycle management, i.e. future lookup and synchronization operations.

Specified by:
getController in class FsManager
Parameters:
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.
Returns:
A file system controller.

getSize

public int getSize()
Description copied from class: FsManager
Returns the number of federated file systems managed by this instance.

Specified by:
getSize in class FsManager
Returns:
The number of federated file systems managed by this instance.

iterator

public Iterator<FsController<?>> iterator()
Description copied from class: FsManager
Returns an iterator for the controller of all federated file systems managed by this instance.

Important: The iterated file system controllers must be ordered so that all file systems appear before any of their parent file systems.

Specified by:
iterator in interface Iterable<FsController<?>>
Specified by:
iterator in class FsManager
Returns:
An iterator for the controller of all federated file systems managed by this instance.

sync

public <X extends IOException> void sync(BitField<FsSyncOption> options,
                                         ExceptionHandler<? super IOException,X> handler)
          throws X extends IOException
Description copied from class: FsManager
Commits all unsynchronized changes to the contents of all federated file systems managed by this instance to their respective parent file system. This will reset the state of the respective file system controllers.

Overrides:
sync in class FsManager
Type Parameters:
X - the type of the IOException to throw at the discretion of the exception handler.
Parameters:
options - the synchronization options.
handler - the exception handling strategy for dealing with one or more input SyncExceptions which may trigger an X.
Throws:
X extends IOException

toString

public String toString()
Returns a string representation of this object for debugging and logging purposes.

Overrides:
toString in class FsManager

TrueZIP Kernel 7.0-rc1

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.