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.

Since:
1.2.0-GA, Apr 4, 2011
Author:
hoatle (hoatlevan at gmail dot com)

Method Summary
 int getNumberOfMultiUpdated(Map<String,Long> sinceTimes)
          Gets the number of updated elements based on the of multi-value since time.
 int getNumberOfNewer(E e)
          Gets the number of newer elements based on the provided element.
 int getNumberOfNewer(Long sinceTime)
          Gets the number of newer elements based on the postedTime.
 int getNumberOfOlder(E e)
          Gets the number of older elements based on the provided element.
 int getSize()
          Overrides its parent interface to avoid checked-exception.
 List<E> getUpadtedActivities(Long sinceTime)
          Gets get updated activities base on since time.
 E[] load(int index, int limit)
          Overrides its parent interface to avoid checked-exception.
 List<E> loadAsList(int index, int limit)
          Loads items as list instead of array as from load(int, int).
 List<E> loadNewer(E e, int length)
          Loads newer elements based on the provided element.
 List<E> loadOlder(E e, int length)
          Loads older elements based on the provided element.
 

Method Detail

loadAsList

List<E> loadAsList(int index,
                   int limit)
Loads items as list instead of array as from load(int, int).

Parameters:
index - the index
limit - the number to load
Returns:
a list

load

E[] load(int index,
         int limit)
Overrides its parent interface to avoid checked-exception.

Specified by:
load in interface org.exoplatform.commons.utils.ListAccess<E>
Parameters:
index - the index
limit - the maximum of elements to return
Returns:
array of elements

getSize

int getSize()
Overrides its parent interface to avoid checked-exception.

Specified by:
getSize in interface org.exoplatform.commons.utils.ListAccess<E>
Returns:
the number of elements.

loadNewer

List<E> loadNewer(E e,
                  int length)
Loads newer elements based on the provided element.

Parameters:
e - the based element
length - number of newer elements to load
Returns:
an array of newer elements

getNumberOfNewer

int getNumberOfNewer(E e)
Gets the number of newer elements based on the provided element.

Parameters:
e - the provided element
Returns:
number of newer elements if any

loadOlder

List<E> loadOlder(E e,
                  int length)
Loads older elements based on the provided element.

Parameters:
e - the based element
length - number of older elements to load
Returns:
an array of older elements

getNumberOfOlder

int getNumberOfOlder(E e)
Gets the number of older elements based on the provided element.

Parameters:
e - the provided element
Returns:
number of older elements if any

getNumberOfNewer

int getNumberOfNewer(Long sinceTime)
Gets the number of newer elements based on the postedTime.

Parameters:
sinceTime - the postedTime
Returns:
number of newer elements if any

getNumberOfMultiUpdated

int getNumberOfMultiUpdated(Map<String,Long> sinceTimes)
Gets the number of updated elements based on the of multi-value since time.

Parameters:
sinceTime - the postedTime
Returns:
number of newer elements if any

getUpadtedActivities

List<E> getUpadtedActivities(Long sinceTime)
Gets get updated activities base on since time.

Parameters:
sinceTime - the sinceTime
Returns:
number of newer elements if any


Copyright © 2013 eXo Platform SAS. All Rights Reserved.