Modifier and Type | Field and Description |
---|---|
static FS.FileStoreAttributes |
FALLBACK_FILESTORE_ATTRIBUTES
Fallback FileStore attributes used when we can't measure the
filesystem timestamp resolution.
|
static Duration |
FALLBACK_TIMESTAMP_RESOLUTION
Fallback filesystem timestamp resolution.
|
Constructor and Description |
---|
FileStoreAttributes(Duration fsTimestampResolution)
Construct a FileStoreAttributeCache entry for the given filesystem
timestamp resolution
|
Modifier and Type | Method and Description |
---|---|
static void |
configureAttributesPathCache(int maxSize,
float purgeFactor)
Configures size and purge factor of the path-based cache for file
system attributes.
|
static FS.FileStoreAttributes |
get(Path path)
Get the FileStoreAttributes for the given FileStore
|
Duration |
getFsTimestampResolution() |
Duration |
getMinimalRacyInterval() |
static void |
setBackground(boolean async)
Whether FileStore attributes should be determined asynchronously
|
String |
toString() |
public static final Duration FALLBACK_TIMESTAMP_RESOLUTION
Must be at least 1 second.
public static final FS.FileStoreAttributes FALLBACK_FILESTORE_ATTRIBUTES
public static void setBackground(boolean async)
async
- whether FileStore attributes should be determined
asynchronously. If false access to cached attributes may
block for some seconds for the first call per FileStorepublic static void configureAttributesPathCache(int maxSize, float purgeFactor)
maxSize
- maximum size of the cache, default is 100purgeFactor
- when the size of the map reaches maxSize the oldest
entries will be purged to free up some space for new
entries, purgeFactor
is the fraction of
maxSize
to purge when this happenspublic static FS.FileStoreAttributes get(Path path)
path
- file residing in the FileStore to get attributes forpublic Duration getMinimalRacyInterval()
@NonNull public Duration getFsTimestampResolution()
Copyright © 2021 Eclipse JGit Project. All rights reserved.