@NotThreadSafe public final class FsResourceController extends FsLockModelDecoratingController<FsController<? extends FsLockModel>>
FsResourceManager
WAIT_TIMEOUT_MILLIS
delegate
Constructor and Description |
---|
FsResourceController(FsController<? extends FsLockModel> controller)
Constructs a new file system resource controller.
|
Modifier and Type | Method and Description |
---|---|
InputSocket<?> |
getInputSocket(FsEntryName name,
BitField<FsInputOption> options)
Returns an input socket for reading the contents of the file system
entry addressed by the given name from the file system.
|
OutputSocket<?> |
getOutputSocket(FsEntryName name,
BitField<FsOutputOption> options,
Entry template)
Returns an output socket for writing the contents of the entry addressed
by the given name to the file system.
|
<X extends IOException> |
sync(BitField<FsSyncOption> options,
ExceptionHandler<? super FsSyncException,X> handler)
Commits all unsynchronized changes to the contents of this file system
to its parent file system,
releases the associated resources (e.g.
|
checkWriteLockedByCurrentThread, isWriteLockedByCurrentThread, readLock, writeLock
getClosedIcon, getEntry, getOpenIcon, getParent, isExecutable, isReadable, isReadOnly, isWritable, mknod, setReadOnly, setTime, setTime, toString, unlink
getModel, getMountPoint, isTouched, setTouched
equals, hashCode, sync
public FsResourceController(FsController<? extends FsLockModel> controller)
controller
- the decorated file system controller.public InputSocket<?> getInputSocket(FsEntryName name, BitField<FsInputOption> options)
FsController
getInputSocket
in class FsDecoratingController<FsLockModel,FsController<? extends FsLockModel>>
name
- the file system entry name.options
- the input options.InputSocket
.public OutputSocket<?> getOutputSocket(FsEntryName name, BitField<FsOutputOption> options, @CheckForNull Entry template)
FsController
template
is not null
, then the output entry shall
have as many of its properties copied as reasonable, e.g. the last
modification time.getOutputSocket
in class FsDecoratingController<FsLockModel,FsController<? extends FsLockModel>>
name
- a file system entry name.options
- a bit field of output options.template
- a nullable template for the properties of the output
entry.OutputSocket
.public <X extends IOException> void sync(BitField<FsSyncOption> options, ExceptionHandler<? super FsSyncException,X> handler) throws IOException
FsController
sync
in class FsDecoratingController<FsLockModel,FsController<? extends FsLockModel>>
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
FsSyncException
s and mapping them to output
IOException
s.IOException
- on any other (not necessarily I/O related) failure.Copyright © 2005-2012 Schlichtherle IT Services. All Rights Reserved.