Package com.attivio.sdk.event
Class PagingContext
- java.lang.Object
-
- com.attivio.sdk.event.PagingContext
-
- All Implemented Interfaces:
java.io.Serializable
public class PagingContext extends java.lang.Object implements java.io.SerializableData structure which keeps track of all ids which are associated with the latest timestamp. As ids are added (add(long, Long)) to the context, if the time for the id is later than the previous latest time, the set reinitialized. Any ids with a the same timestamp as the current latest time is added to the set of ids. Ids with earlier timestamps are ignored.This data structure is necessary to handle the case when a paging request is fulfilled within a series of events with the same timestamp. The context allows the API to resume the page at the proper location within the timestamp.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PagingContext()PagingContext(PagingContext other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(long t, java.lang.Long id)booleancontains(long id)booleanequals(java.lang.Object obj)java.util.HashSet<java.lang.Long>getIds()longgetTimestamp()inthashCode()
-
-
-
Constructor Detail
-
PagingContext
public PagingContext()
-
PagingContext
public PagingContext(PagingContext other)
-
-
Method Detail
-
getTimestamp
public long getTimestamp()
-
getIds
public java.util.HashSet<java.lang.Long> getIds()
-
contains
public boolean contains(long id)
-
add
public void add(long t, java.lang.Long id)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-