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 classstatic enumstatic enumstatic final record -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStorageMaintenancePolicy(StorageMaintenancePolicy.MaintenanceAction action, StorageMaintenancePolicy.MaintenanceLimit limit) Creates an instance of aStorageMaintenancePolicyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.final booleanIndicates whether some other object is "equal to" this one.longlonglongfinal inthashCode()Returns a hash code value for this object.booleanhasReachedCountLimit(long count) booleanhasReachedFileSizeLimit(long fileSize) booleanhasReachedTimeDurationLimit(long duration) limit()Returns the value of thelimitrecord component.booleanbooleantoString()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 aStorageMaintenancePolicyrecord class.- Parameters:
action- the value for theactionrecord componentlimit- the value for thelimitrecord 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 theactionrecord component.- Returns:
- the value of the
actionrecord component
-
limit
Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-