Record Class QueueConfig
java.lang.Object
java.lang.Record
com.loomcache.common.config.QueueConfig
- Record Components:
capacity- maximum queue item count, or0for unboundedemptyQueueTtlMillis- milliseconds an empty queue may remain before removal, or-1to disable
Declarative per-queue configuration.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionQueueConfig(int capacity, long emptyQueueTtlMillis) Creates an instance of aQueueConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic QueueConfig.Builderbuilder()intcapacity()Returns the value of thecapacityrecord component.longReturns the value of theemptyQueueTtlMillisrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanbooleanfinal inthashCode()Returns a hash code value for this object.intmaxSize()Hazelcast-compatible alias forcapacity().final StringtoString()Returns a string representation of this record class.
-
Field Details
-
UNBOUNDED_CAPACITY
public static final int UNBOUNDED_CAPACITY- See Also:
-
EMPTY_QUEUE_TTL_DISABLED
public static final long EMPTY_QUEUE_TTL_DISABLED- See Also:
-
DEFAULT
-
-
Constructor Details
-
QueueConfig
public QueueConfig(int capacity, long emptyQueueTtlMillis) Creates an instance of aQueueConfigrecord class.- Parameters:
capacity- the value for thecapacityrecord componentemptyQueueTtlMillis- the value for theemptyQueueTtlMillisrecord component
-
-
Method Details
-
maxSize
public int maxSize()Hazelcast-compatible alias forcapacity(). -
hasCapacityLimit
public boolean hasCapacityLimit() -
hasEmptyQueueTtl
public boolean hasEmptyQueueTtl() -
builder
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
capacity
-
emptyQueueTtlMillis
public long emptyQueueTtlMillis()Returns the value of theemptyQueueTtlMillisrecord component.- Returns:
- the value of the
emptyQueueTtlMillisrecord component
-