Class ContainerMeta

java.lang.Object
org.rostore.entity.media.ContainerMeta

public class ContainerMeta extends Object
Specifies the major container properties, such as the maximum size and maximum TTL of the keys the container will allow to store, as well as the number of container's shard.

These values can only be set at the time of container creation.

  • Constructor Details

    • ContainerMeta

      public ContainerMeta()
  • Method Details

    • getCreationTime

      public long getCreationTime()
    • setCreationTime

      public void setCreationTime(long creationTime)
    • getMaxSize

      public long getMaxSize()
      The maximum size of the container.

      The criteria is loosely checked, but will eventually be enforced.

      Returns:
      the maximum size in bytes
    • setMaxSize

      public void setMaxSize(long maxSize)
      Sets the maximum size of the container.
    • getShardNumber

      public int getShardNumber()
      The number of shards the container will have.
      Returns:
      the number of shards
    • setShardNumber

      public void setShardNumber(int shardNumber)
      Sets the number of shards the container will have.
    • getMaxTTL

      public long getMaxTTL()
      The maximum TTL in seconds that the keys can have in the container.

      If the client would try to create a key with a higher TTL, it will be capped.

      Returns:
      maximum TTL of the keys in the container in seconds
    • setMaxTTL

      public void setMaxTTL(long maxTTL)
      Sets maximum TTL of the container key
      Parameters:
      maxTTL - in seconds