public static enum ExpertFeature.Reason extends Enum<ExpertFeature.Reason>
Enum Constant and Description |
---|
INJECTING_A_DIFFERENT_DETECTOR_FOR_THE_SAME_PATH_MAY_CORRUPT_DATA
Injecting a different archive detector for the same virtual file
system path may cause data corruption.
|
THE_PRESENCE_OR_ABSENCE_OF_SOME_OPTIONS_MAY_YIELD_UNWANTED_SIDE_EFFECTS
The presence or absence of some synchronization options may yield
unwanted side effects.
|
Modifier and Type | Method and Description |
---|---|
String |
toString() |
static ExpertFeature.Reason |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ExpertFeature.Reason[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ExpertFeature.Reason INJECTING_A_DIFFERENT_DETECTOR_FOR_THE_SAME_PATH_MAY_CORRUPT_DATA
The state of the virtual file system very much depends on the archive detector which has been previously used to access the same virtual file system path. If there is a mismatch between the injected archive detector and the previously used archive detector, then the result of an operation is hard to predict but you can expect to see spurious false positive or false negative archive file detection or even data corruption up to the point of total data loss!
This is particularly true for multithreaded applications: If a thread changes the archive detector which is associated with a given virtual file system path, then another thread may get an unexpected result when accessing the same virtual file system path, with all the after effects described above.
Now that you have been warned, here is a high-level strategy for effectively associating a different archive detector to a given virtual file system path:
TVFS.umount()
.
Your best choice is the umount method with no parameters.
However, if you have to do this selectively, make sure the
filter parameter really covers the virtual file system path you
want to access and the effective options are
FsSyncOptions.UMOUNT
.
I leave it up to you to figure the details - again, this is an expert feature!
public static final ExpertFeature.Reason THE_PRESENCE_OR_ABSENCE_OF_SOME_OPTIONS_MAY_YIELD_UNWANTED_SIDE_EFFECTS
FsSyncOption.CLEAR_CACHE
is absent, then
the selective entry cache doesn' get cleared and hence the state
associated with a particular file system path may not get totally
cleared.
On the other hand, the presence of the
FsSyncOption.FORCE_CLOSE_IO
will forcibly close any open
streams and channels (after some timeout), regardless if they are
currently used by other threads or not.public String toString()
toString
in class Enum<ExpertFeature.Reason>
public static ExpertFeature.Reason valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static ExpertFeature.Reason[] values()
for (ExpertFeature.Reason c : ExpertFeature.Reason.values()) System.out.println(c);
Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.