Record Class StorageMaintenancePolicy
java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.gateway.storeforward.strategy.StorageMaintenancePolicy
public record StorageMaintenancePolicy(StorageMaintenancePolicy.MaintenanceAction action, StorageMaintenancePolicy.MaintenanceLimit limit)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static enum
static enum
static final record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStorageMaintenancePolicy
(StorageMaintenancePolicy.MaintenanceAction action, StorageMaintenancePolicy.MaintenanceLimit limit) Creates an instance of aStorageMaintenancePolicy
record class. -
Method Summary
Modifier and TypeMethodDescriptionaction()
Returns the value of theaction
record component.final boolean
Indicates whether some other object is "equal to" this one.long
long
long
final int
hashCode()
Returns a hash code value for this object.boolean
hasReachedCountLimit
(long count) boolean
hasReachedFileSizeLimit
(long fileSize) boolean
hasReachedTimeDurationLimit
(long duration) limit()
Returns the value of thelimit
record component.boolean
boolean
toString()
Returns a string representation of this record class.
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
StorageMaintenancePolicy
public StorageMaintenancePolicy(StorageMaintenancePolicy.MaintenanceAction action, StorageMaintenancePolicy.MaintenanceLimit limit) Creates an instance of aStorageMaintenancePolicy
record class.- Parameters:
action
- the value for theaction
record componentlimit
- the value for thelimit
record component
-
-
Method Details
-
shouldPreventNew
public boolean shouldPreventNew() -
shouldEvictOldest
public boolean shouldEvictOldest() -
hasReachedCountLimit
public boolean hasReachedCountLimit(long count) -
hasReachedFileSizeLimit
public boolean hasReachedFileSizeLimit(long fileSize) -
hasReachedTimeDurationLimit
public boolean hasReachedTimeDurationLimit(long duration) -
getCountLimit
public long getCountLimit() -
getFileSizeLimit
public long getFileSizeLimit() -
getTimeDurationLimit
public long getTimeDurationLimit() -
newEvictOldestBuilder
-
newPreventNewBuilder
-
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 withObjects::equals(Object,Object)
. -
action
Returns the value of theaction
record component.- Returns:
- the value of the
action
record component
-
limit
Returns the value of thelimit
record component.- Returns:
- the value of the
limit
record component
-