Package org.apache.commons.vfs2
Enum CacheStrategy
- All Implemented Interfaces:
Serializable
,Comparable<CacheStrategy>
An enumerated type to deal with the various cache strategies.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDeal with cached data manually.Refresh the data every time you call a method on the fileObject.Refresh the data every time you request a file fromFileSystemManager.resolveFile(java.io.File, java.lang.String)
. -
Method Summary
Modifier and TypeMethodDescriptiongetName()
Returns the name of the scope.toString()
Returns the name of the scope.static CacheStrategy
Returns the enum constant of this type with the specified name.static CacheStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
MANUAL
Deal with cached data manually. CallFileObject.refresh()
to refresh the object data. -
ON_RESOLVE
Refresh the data every time you request a file fromFileSystemManager.resolveFile(java.io.File, java.lang.String)
. -
ON_CALL
Refresh the data every time you call a method on the fileObject. You'll use this only if you really need the latest info as this setting is a major performance loss.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getName
Returns the name of the scope.- Returns:
- the name of the scope.
-
toString
Returns the name of the scope.- Overrides:
toString
in classEnum<CacheStrategy>
- Returns:
- the name of the scope.
-