org.sakaiproject.component.adaptor
Interface UsageSessionServiceAdaptor.Storage

All Known Implementing Classes:
UsageSessionServiceAdaptor.ClusterStorage
Enclosing interface:
UsageSessionServiceAdaptor

protected static interface UsageSessionServiceAdaptor.Storage

Storage


Method Summary
 boolean addSession(UsageSession session)
          Take this session into storage.
 void close()
          Close.
 void closeSession(UsageSession session)
          This session is now closed.
 List getOpenSessions()
          Access a list of all open sessions.
 UsageSession getSession(String id)
          Access a session by id
 List getSessions(List ids)
          Access a bunch of sessions by the List id session ids.
 List getSessions(String criteria, Object[] values)
          Access a List of usage sessions by *arbitrary criteria*.
 void open()
          Open.
 

Method Detail

open

public void open()
Open.


close

public void close()
Close.


addSession

public boolean addSession(UsageSession session)
Take this session into storage.

Parameters:
session - The usage session.
Returns:
true if added successfully, false if not.

getSession

public UsageSession getSession(String id)
Access a session by id

Parameters:
id - The session id.
Returns:
The session object.

getSessions

public List getSessions(List ids)
Access a bunch of sessions by the List id session ids.

Parameters:
ids - The session id List.
Returns:
The List (UsageSession) of session objects for these ids.

getSessions

public List getSessions(String criteria,
                        Object[] values)
Access a List of usage sessions by *arbitrary criteria*.

Parameters:
criteria - A string with meaning known to the particular implementation of the API running.
Returns:
The List (UsageSession) of UsageSession object for these ids.

closeSession

public void closeSession(UsageSession session)
This session is now closed.

Parameters:
session - The session which is closed.

getOpenSessions

public List getOpenSessions()
Access a list of all open sessions.

Returns:
a List (UsageSession) of all open sessions, ordered by server, then by start (asc)