public interface Event
An event in a user’s history. Events are associated with items. In some cases, it makes sense that a user may have events not associated with an item (such as login/logout events). We recommend that integrators use a designated item ID in such cases. If that item type never shows up in events used by recommenders, then it should not affect the recommenders.
Event objects should always be immutable, and have well-defined Object.equals(Object)
and Object.hashCode()
methods.
Modifier and Type | Method and Description |
---|---|
long |
getItemId()
Get the item ID.
|
long |
getTimestamp()
Get the event timestamp.
|
long |
getUserId()
Get the ID of the user responsible for the event.
|
long getUserId()
Get the ID of the user responsible for the event.
long getItemId()
Get the item ID.
long getTimestamp()
Get the event timestamp. A timestamp of -1 indicates that the event has no timestamp; such events should generally be considered to happen infinitely long ago.