Package org.rostore.entity.media
Class ContainerListProperties
java.lang.Object
org.rostore.entity.media.ContainerListProperties
The class contains the properties that steers the list of containers.
This information is provided at the storage creation and can't be changed later.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
static final int
static final long
static final int
static final int
Number of opened KeyOperations object for every opened shard -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
long
int
long
The maximum size in bytes of all container names in the listint
The maximum number of containers in the storageint
The maximum number of key operations that the shard would support in parallel.void
setAutoCloseContainersAfterMillis
(long autoCloseContainersAfterMillis) void
setCleanupIntervalMillis
(long cleanupIntervalMillis) void
setMaxCleanupsPerCycle
(int maxCleanupsPerCycle) void
setMaxContainersListSize
(long maxContainersListSize) Sets the maximum size in bytes of all container names in the listvoid
setMaxContainersPerList
(int maxContainersPerList) Sets the maximum number of containers in the storage.void
setMaxKeyOperationsPerShard
(int maxKeyOperationsPerShard) Sets the number of parallel operations per shard.
-
Field Details
-
CLEANUP_INTERVAL_MILLIS_DEFAULT
public static final long CLEANUP_INTERVAL_MILLIS_DEFAULT- See Also:
-
MAX_CLEANS_PER_CYCLE_DEFAULT
public static final int MAX_CLEANS_PER_CYCLE_DEFAULT- See Also:
-
LIST_MAX_CONTAINERS_DEFAULT
public static final int LIST_MAX_CONTAINERS_DEFAULT- See Also:
-
LIST_MAX_SIZE_DEFAULT
public static final long LIST_MAX_SIZE_DEFAULT- See Also:
-
MAX_KEY_OPERATIONS_PER_SHARD_DEFAULT
public static final int MAX_KEY_OPERATIONS_PER_SHARD_DEFAULTNumber of opened KeyOperations object for every opened shard- See Also:
-
-
Constructor Details
-
ContainerListProperties
public ContainerListProperties()
-
-
Method Details
-
getAutoCloseContainersAfterMillis
public long getAutoCloseContainersAfterMillis() -
setAutoCloseContainersAfterMillis
public void setAutoCloseContainersAfterMillis(long autoCloseContainersAfterMillis) -
getCleanupIntervalMillis
public long getCleanupIntervalMillis() -
setCleanupIntervalMillis
public void setCleanupIntervalMillis(long cleanupIntervalMillis) -
getMaxCleanupsPerCycle
public int getMaxCleanupsPerCycle() -
setMaxCleanupsPerCycle
public void setMaxCleanupsPerCycle(int maxCleanupsPerCycle) -
getMaxContainersPerList
public int getMaxContainersPerList()The maximum number of containers in the storage- Returns:
- the number of containers.
-
setMaxContainersPerList
public void setMaxContainersPerList(int maxContainersPerList) Sets the maximum number of containers in the storage.- Parameters:
maxContainersPerList
- The maximum number of containers in the storage
-
getMaxContainersListSize
public long getMaxContainersListSize()The maximum size in bytes of all container names in the list- Returns:
- the size of all container names in the list in bytes
-
setMaxContainersListSize
public void setMaxContainersListSize(long maxContainersListSize) Sets the maximum size in bytes of all container names in the list- Parameters:
maxContainersListSize
- maximum size in bytes of all container names in the list
-
getMaxKeyOperationsPerShard
public int getMaxKeyOperationsPerShard()The maximum number of key operations that the shard would support in parallel.Only key-read operations would be executed in parallel. Write operation is all the time blocking.
The jey operation context of these amount is kept cached in memory and get reused.
If more operation is executed, they get queued and will be executed in order of their arrival.
- Returns:
- the maximum operations executed per shard in parallel
-
setMaxKeyOperationsPerShard
public void setMaxKeyOperationsPerShard(int maxKeyOperationsPerShard) Sets the number of parallel operations per shard.- Parameters:
maxKeyOperationsPerShard
- the number of parallel operations per shard.
-