java.lang.Object
com.arpnetworking.clusteraggregator.models.ebean.PartitionSet

@Entity public final class PartitionSet extends Object
Model that holds the aggregate partitions for a PartitionSet.
Author:
Brandon Arp (brandon dot arp at inscopemetrics dot com)
  • Method Details

    • findOrCreate

      public static PartitionSet findOrCreate(String name, Database database, int maximumEntriesPerPartition, int maximumPartitions)
      Finds or creates a partition set. NOTE: if the partition set is found, the values for maximumEntriesPerPartition and maximumPartitions are used from the model and *NOT* from the parameters. Once the model is created, these values cannot change.
      Parameters:
      name - the name of the partition
      database - the database backing the data
      maximumEntriesPerPartition - the maximum number of entries in a partition
      maximumPartitions - the maximum number of partitions in the partition set
      Returns:
      a partition set with the given name
    • getId

      public Long getId()
    • setId

      public void setId(Long value)
    • getCreatedAt

      public Timestamp getCreatedAt()
    • setCreatedAt

      public void setCreatedAt(Timestamp value)
    • getName

      public String getName()
    • setName

      public void setName(String value)
    • getUpdatedAt

      public Timestamp getUpdatedAt()
    • setUpdatedAt

      public void setUpdatedAt(Timestamp value)
    • getVersion

      public Long getVersion()
    • setVersion

      public void setVersion(Long value)
    • getCount

      public Integer getCount()
    • setCount

      public void setCount(Integer value)
    • getMaximumPartitions

      public Integer getMaximumPartitions()
    • getFull

      public Boolean getFull()
    • setFull

      public void setFull(Boolean value)
    • getMaximumEntriesPerPartition

      public Integer getMaximumEntriesPerPartition()
    • lock

      public void lock(Database database)
      Locks the record with a select for update.
      Parameters:
      database - the database backing the data