Record Class StoreItem
java.lang.Object
java.lang.Record
io.agentscope.harness.agent.filesystem.remote.store.StoreItem
- Record Components:
key- the item's key within its namespacevalue- the item's data as a string-keyed mapversion- monotonically increasing version counter; starts at 1 and increments on every successfulBaseStore.put(java.util.List<java.lang.String>, java.lang.String, java.util.Map<java.lang.String, java.lang.Object>)orBaseStore.putIfVersion(java.util.List<java.lang.String>, java.lang.String, java.util.Map<java.lang.String, java.lang.Object>, long). A value of0means the version is unknown (e.g. items returned by legacy implementations that predate versioning).
A single item retrieved from a
BaseStore.-
Constructor Summary
Constructors -
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.key()Returns the value of thekeyrecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.longversion()Returns the value of theversionrecord component.
-
Constructor Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
version
public long version()Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-