java.lang.Object
java.lang.Record
stormpot.internal.PoolBuilderPermissions
- Record Components:
setAllocator-trueif the allocator can be changed, otherwisefalse.setSize-trueif the size can be changed, otherwisefalse.setExpiration-trueif the expiration can be changed, otherwisefalse.setThreadFactory-trueif the thread factory can be changed, otherwisefalse.setBackgroundExpiration-trueif background expiration checking can be enabled or disabled, otherwisefalse.
public record PoolBuilderPermissions(boolean setAllocator, boolean setSize, boolean setExpiration, boolean setThreadFactory, boolean setBackgroundExpiration)
extends Record
A holder of permissions, deciding what
PoolBuilder settings are allowed to be changed.-
Constructor Summary
ConstructorsConstructorDescriptionPoolBuilderPermissions(boolean setAllocator, boolean setSize, boolean setExpiration, boolean setThreadFactory, boolean setBackgroundExpiration) Creates an instance of aPoolBuilderPermissionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thesetAllocatorrecord component.booleanReturns the value of thesetBackgroundExpirationrecord component.booleanReturns the value of thesetExpirationrecord component.booleansetSize()Returns the value of thesetSizerecord component.booleanReturns the value of thesetThreadFactoryrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PoolBuilderPermissions
public PoolBuilderPermissions(boolean setAllocator, boolean setSize, boolean setExpiration, boolean setThreadFactory, boolean setBackgroundExpiration) Creates an instance of aPoolBuilderPermissionsrecord class.- Parameters:
setAllocator- the value for thesetAllocatorrecord componentsetSize- the value for thesetSizerecord componentsetExpiration- the value for thesetExpirationrecord componentsetThreadFactory- the value for thesetThreadFactoryrecord componentsetBackgroundExpiration- the value for thesetBackgroundExpirationrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
setAllocator
public boolean setAllocator()Returns the value of thesetAllocatorrecord component.- Returns:
- the value of the
setAllocatorrecord component
-
setSize
public boolean setSize()Returns the value of thesetSizerecord component.- Returns:
- the value of the
setSizerecord component
-
setExpiration
public boolean setExpiration()Returns the value of thesetExpirationrecord component.- Returns:
- the value of the
setExpirationrecord component
-
setThreadFactory
public boolean setThreadFactory()Returns the value of thesetThreadFactoryrecord component.- Returns:
- the value of the
setThreadFactoryrecord component
-
setBackgroundExpiration
public boolean setBackgroundExpiration()Returns the value of thesetBackgroundExpirationrecord component.- Returns:
- the value of the
setBackgroundExpirationrecord component
-