Package org.exoplatform.social.common
Interface RealtimeListAccess<E>
- All Superinterfaces:
org.exoplatform.commons.utils.ListAccess<E>
public interface RealtimeListAccess<E>
extends org.exoplatform.commons.utils.ListAccess<E>
The Realtime list access interface to provide more facility to list access for easier real-time access.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T[]convertListToArray(List<T> list, Class<T> type) intGets the number of newer elements based on the provided element.intgetNumberOfNewer(Long sinceTime) Gets the number of newer elements based on the updated time.intGets the number of older elements based on the provided element.intgetNumberOfOlder(Long sinceTime) Gets the number of older elements based on the updated time.intGets the number of stream elements based on the updated time.intgetSize()Overrides its parent interface to avoid checked-exception.getUpadtedActivities(Long sinceTime, int limit) Gets get updated activities base on since time.E[]load(int index, int limit) Overrides its parent interface to avoid checked-exception.loadAsList(int index, int limit) Loads items as list instead of array as fromload(int, int).loadIdsAsList(int index, int limit) Loads items as Ids list instead of array as fromload(int, int).Loads newer elements based on the provided element.Loads newer elements based on the provided element.Loads older elements based on the provided element.Loads older elements based on the provided element.
-
Method Details
-
loadAsList
Loads items as list instead of array as fromload(int, int).- Parameters:
index- the indexlimit- the number to load- Returns:
- a list
-
loadIdsAsList
Loads items as Ids list instead of array as fromload(int, int).- Parameters:
index- the indexlimit- the number to load- Returns:
- a Ids list
-
load
Overrides its parent interface to avoid checked-exception.- Specified by:
loadin interfaceorg.exoplatform.commons.utils.ListAccess<E>- Parameters:
index- the indexlimit- the maximum of elements to return- Returns:
- array of elements
-
getSize
int getSize()Overrides its parent interface to avoid checked-exception.- Specified by:
getSizein interfaceorg.exoplatform.commons.utils.ListAccess<E>- Returns:
- the number of elements.
-
loadNewer
Loads newer elements based on the provided element.- Parameters:
e- the based elementlength- number of newer elements to load- Returns:
- an array of newer elements
-
getNumberOfNewer
Gets the number of newer elements based on the provided element.- Parameters:
e- the provided element- Returns:
- number of newer elements if any
-
loadOlder
Loads older elements based on the provided element.- Parameters:
e- the based elementlength- number of older elements to load- Returns:
- an array of older elements
-
getNumberOfOlder
Gets the number of older elements based on the provided element.- Parameters:
e- the provided element- Returns:
- number of older elements if any
-
getNumberOfNewer
Gets the number of newer elements based on the updated time.- Parameters:
sinceTime- the updated time- Returns:
- number of newer elements if any
-
getUpadtedActivities
Gets get updated activities base on since time.- Parameters:
sinceTime- the sinceTimelimit- number of newer elements to load- Returns:
- number of newer elements if any
-
loadNewer
Loads newer elements based on the provided element.- Parameters:
sinceTime- updated time of newer elements to loadlimit- number of newer elements to load- Returns:
- an array of newer elements
-
loadOlder
Loads older elements based on the provided element.- Parameters:
sinceTime- updated time of older elements to loadlimit- number of older elements to load- Returns:
- an array of older elements
-
getNumberOfOlder
Gets the number of older elements based on the updated time.- Parameters:
sinceTime- the updated time- Returns:
- number of older elements if any
-
getNumberOfUpgrade
int getNumberOfUpgrade()Gets the number of stream elements based on the updated time. This one will make query to count for load more case.- Returns:
- number of elements if any
-
convertListToArray
-