@NotThreadSafe public final class FsCacheController extends FsLockModelDecoratingController<FsController<? extends FsLockModel>>
input socket with the input option
FsInputOption.CACHE or the method
output socket with the output option
FsOutputOption.CACHE.
synced again.
synced - this is a
write back strategy.
TO THE FUTURE ME: FOR TRUEZIP 7.5, IT TOOK ME TWO MONTHS OF CONSECUTIVE CODING, TESTING, DEBUGGING, ANALYSIS AND SWEATING TO GET THIS DAMN BEAST WORKING STRAIGHT! DON'T EVEN THINK YOU COULD CHANGE A SINGLE CHARACTER IN THIS CODE AND EASILY GET AWAY WITH IT! YOU HAVE BEEN WARNED!
Well, if you really feel like changing something, run the integration test suite at least ten times to make sure your changes really work - I mean it!
WAIT_TIMEOUT_MILLISdelegate| Constructor and Description |
|---|
FsCacheController(FsController<? extends FsLockModel> controller,
IOPool<?> pool)
Constructs a new file system cache 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.
|
void |
mknod(FsEntryName name,
Entry.Type type,
BitField<FsOutputOption> options,
Entry template)
Creates or replaces and finally links a chain of one or more entries
for the given entry
name into 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. target archive files) for
access by third parties (e.g. other processes), cleans up any temporary
allocated resources (e.g. temporary files) and purges any cached data.
|
void |
unlink(FsEntryName name,
BitField<FsOutputOption> options)
Removes the named file system entry from the file system.
|
checkWriteLockedByCurrentThread, isWriteLockedByCurrentThread, readLock, writeLockgetClosedIcon, getEntry, getOpenIcon, getParent, isExecutable, isReadable, isReadOnly, isWritable, setReadOnly, setTime, setTime, toStringgetModel, getMountPoint, isTouched, setTouchedequals, hashCode, syncpublic FsCacheController(FsController<? extends FsLockModel> controller, IOPool<?> pool)
controller - the decorated file system controller.pool - the pool of I/O buffers to hold the cached entry contents.public InputSocket<?> getInputSocket(FsEntryName name, BitField<FsInputOption> options)
FsControllergetInputSocket 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)
FsControllertemplate 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 void mknod(FsEntryName name, Entry.Type type, BitField<FsOutputOption> options, @CheckForNull Entry template) throws IOException
FsControllername into the file system.mknod in class FsDecoratingController<FsLockModel,FsController<? extends FsLockModel>>name - the file system entry name.type - the file system entry type.options - the file system output options.
If FsOutputOption.CREATE_PARENTS is set, any missing
parent directories will be created and linked into the file
system with its last modification time set to the system's
current time.template - if not null, then the file system entry
at the end of the chain shall inherit as much properties from
this entry as possible - with the exception of its name and type.IOException - on any I/O failure, including but not limited to
these reasons:
name contains characters which are not
supported by the file system.
FsOutputOption.EXCLUSIVE is set or the entry is a
directory.
createParents is
false.
public <X extends IOException> void sync(BitField<FsSyncOption> options, ExceptionHandler<? super FsSyncException,X> handler) throws IOException
FsControllersync 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
FsSyncExceptions and mapping them to output
IOExceptions.IOException - on any other (not necessarily I/O related) failure.public void unlink(FsEntryName name, BitField<FsOutputOption> options) throws IOException
FsControllerunlink in class FsDecoratingController<FsLockModel,FsController<? extends FsLockModel>>name - the file system entry name.options - output options for this operation.IOException - on any I/O failure.Copyright © 2005-2012 Schlichtherle IT Services. All Rights Reserved.