public class RepositoryCacheConfig extends Object
Modifier and Type | Field and Description |
---|---|
static long |
AUTO_CLEANUP_DELAY
Set cleanupDelayMillis to this value in order to auto-set it to minimum
of 1/10 of expireAfterMillis and 10 minutes
|
static long |
NO_CLEANUP
Set cleanupDelayMillis to this value in order to switch off time-based
cache eviction.
|
Constructor and Description |
---|
RepositoryCacheConfig()
Create a default configuration.
|
Modifier and Type | Method and Description |
---|---|
RepositoryCacheConfig |
fromConfig(Config config)
Update properties by setting fields from the configuration.
|
long |
getCleanupDelay()
Get the delay between the periodic cleanup of expired repository in
milliseconds.
|
long |
getExpireAfter()
Get the time an unused repository should be expired and be evicted from
the RepositoryCache in milliseconds.
|
void |
install()
Install this configuration as the live settings.
|
void |
setCleanupDelay(long cleanupDelayMillis)
Set the delay between the periodic cleanup of expired repository in
milliseconds.
|
void |
setExpireAfter(long expireAfterMillis)
Set the time an unused repository should be expired and be evicted from
the RepositoryCache in milliseconds.
|
public static final long NO_CLEANUP
public static final long AUTO_CLEANUP_DELAY
public RepositoryCacheConfig()
public long getExpireAfter()
public void setExpireAfter(long expireAfterMillis)
expireAfterMillis
- the time an unused repository should be expired and be evicted
from the RepositoryCache in milliseconds.public long getCleanupDelay()
public void setCleanupDelay(long cleanupDelayMillis)
cleanupDelayMillis
- the delay between the periodic cleanup of expired repository
in milliseconds. Set it to AUTO_CLEANUP_DELAY
to
automatically derive cleanup delay from expireAfterMillis.
Set it to NO_CLEANUP
in order to switch off cache
expiration.
If cache expiration is switched off the JVM still can evict cache entries when the JVM is running low on available heap memory.
public RepositoryCacheConfig fromConfig(Config config)
If a property is not defined in the configuration, then it is left unmodified.
config
- configuration to read properties from.this
.public void install()
The new configuration is applied immediately.
Copyright © 2018 Eclipse JGit Project. All rights reserved.