@Immutable public final class FsSyncOptions extends Object
FsController.sync(BitField)
,
FsSyncOption
Modifier and Type | Field and Description |
---|---|
static net.java.truecommons.shed.BitField<FsSyncOption> |
NONE
A bit field with no synchronization options set.
|
static net.java.truecommons.shed.BitField<FsSyncOption> |
RESET
Aborts all pending changes for the federated file system, clears the
selective cache without flushing it and makes the file system controller
eligible for garbage collection unless any strong references are held by
the client application.
|
static net.java.truecommons.shed.BitField<FsSyncOption> |
SYNC
Waits for all other threads to close their I/O resources (i.e.
|
static net.java.truecommons.shed.BitField<FsSyncOption> |
UMOUNT
Forcibly closes all I/O resources (i.e.
|
Modifier and Type | Method and Description |
---|---|
static net.java.truecommons.shed.BitField<FsSyncOption> |
of(FsSyncOption... options)
Converts the given array to a bit field of synchronization options.
|
public static final net.java.truecommons.shed.BitField<FsSyncOption> NONE
public static final net.java.truecommons.shed.BitField<FsSyncOption> RESET
BitField.of(FsSyncOption.ABORT_CHANGES)
.
These options are only meaningful immediately before the federated file system itself gets deleted and should not of used by client applications.
public static final net.java.truecommons.shed.BitField<FsSyncOption> SYNC
BitField.of(FsSyncOption.WAIT_CLOSE_IO)
.
These options should be used if a multithreaded application wants to synchronize all mounted archive files without affecting any I/O to these archive files by any other thread.
Note that this bit field deliberately doesn't include CLEAR_CACHE! This is because CLEAR_CACHE may induce dead locks or even busy loops when accessing nested archive files in different threads.
public static final net.java.truecommons.shed.BitField<FsSyncOption> UMOUNT
BitField.of(FsSyncOption.FORCE_CLOSE_IO, FsSyncOption.CLEAR_CACHE)
.
These options should be used if an application wants to synchronize all mounted archive files and make sure to clean up all resources, including the selective entry cache. Care should be taken not to use these options while any other thread is still doing I/O to the archive files because otherwise the threads may not be able to succeed and receive an exception.
public static net.java.truecommons.shed.BitField<FsSyncOption> of(FsSyncOption... options)
options
- an array of synchronization options.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.