Package akka.javasdk.view
Record Class EntryWithMetadata<T>
- Type Parameters:
T- The type of the view entry- Record Components:
entry- The actual entry from the viewmetadata- Additional metadata for the entry
-
Constructor Summary
ConstructorsConstructorDescriptionEntryWithMetadata(T entry, Metadata metadata) Creates an instance of aEntryWithMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionentry()Returns the value of theentryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.final StringtoString()Returns a string representation of this record class.<O> EntryWithMetadata<O> withEntry(O newEntry) Create a new view entry with the same metadata.
-
Constructor Details
-
Method Details
-
lastUpdated
- Returns:
- A timestamp when the view entry was last updated
-
withEntry
Create a new view entry with the same metadata. Useful for returning something else than the exact entry returned from the view, through {{Source#map}}, but still be able to let SSE clients to resume from the last seen event. -
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). -
entry
Returns the value of theentryrecord component.- Returns:
- the value of the
entryrecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-