Class PartitionSet
java.lang.Object
com.arpnetworking.clusteraggregator.models.ebean.PartitionSet
Model that holds the aggregate partitions for a
PartitionSet
.- Author:
- Brandon Arp (brandon dot arp at inscopemetrics dot com)
-
Method Summary
Modifier and TypeMethodDescriptionstatic PartitionSet
findOrCreate
(String name, Database database, int maximumEntriesPerPartition, int maximumPartitions) Finds or creates a partition set.getCount()
getFull()
getId()
getName()
void
Locks the record with a select for update.void
void
setCreatedAt
(Timestamp value) void
void
void
void
setUpdatedAt
(Timestamp value) void
setVersion
(Long value)
-
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 partitiondatabase
- the database backing the datamaximumEntriesPerPartition
- the maximum number of entries in a partitionmaximumPartitions
- the maximum number of partitions in the partition set- Returns:
- a partition set with the given name
-
getId
-
setId
-
getCreatedAt
-
setCreatedAt
-
getName
-
setName
-
getUpdatedAt
-
setUpdatedAt
-
getVersion
-
setVersion
-
getCount
-
setCount
-
getMaximumPartitions
-
getFull
-
setFull
-
getMaximumEntriesPerPartition
-
lock
Locks the record with a select for update.- Parameters:
database
- the database backing the data
-