@Immutable public final class FsSyncOptions extends Object
FsController.sync(BitField)
,
FsSyncOption
Modifier and Type | Field and Description |
---|---|
static BitField<FsSyncOption> |
NONE
A bit field with no synchronization options set.
|
static 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 BitField<FsSyncOption> |
SYNC
Waits for all other threads to close their I/O resources (i.e.
|
static BitField<FsSyncOption> |
UMOUNT
Forcibly closes all I/O resources (i.e.
|
Modifier and Type | Method and Description |
---|---|
static BitField<FsSyncOption> |
of(FsSyncOption... options)
Converts the given array to a bit field of synchronization options.
|
public static final BitField<FsSyncOption> NONE
public static final 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 BitField<FsSyncOption> SYNC
BitField.of(FsSyncOption.WAIT_CLOSE_INPUT, FsSyncOption.WAIT_CLOSE_OUTPUT)
.
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 BitField<FsSyncOption> UMOUNT
BitField.of(FsSyncOption.FORCE_CLOSE_INPUT, FsSyncOption.FORCE_CLOSE_OUTPUT, 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 BitField<FsSyncOption> of(FsSyncOption... options)
options
- an array of synchronization options.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.