Record Class InsertResult
java.lang.Object
java.lang.Record
smile.llm.cache.InsertResult
- Record Components:
prefixLen- the number of tokens that were already present in the cache before this insert. The caller may free the duplicate KV cache entries for indices[0, prefixLen).lastNode- theRadixTreeNodethat holds the newly inserted (or previously cached) tokens. The caller should keep a reference to this node for lock-reference management.
Result returned by
RadixCache.insert(int[], Tensor).-
Constructor Summary
ConstructorsConstructorDescriptionInsertResult(int prefixLen, RadixTreeNode lastNode) Creates an instance of aInsertResultrecord 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.lastNode()Returns the value of thelastNoderecord component.intReturns the value of theprefixLenrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
prefixLen
-
lastNode
-