Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.project.internal.ActivityQueuer Class Reference

List of all members.

Public Member Functions

 ActivityQueuer ()
synchronized List< IActivityprocess (List< IActivity > activities)
synchronized void enableQueuing (IProject project)
synchronized void disableQueuing ()

Detailed Description

This class enables the queuing of IActivity activities} for given projects.


Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.project.internal.ActivityQueuer.ActivityQueuer ( )

Member Function Documentation

synchronized void de.fu_berlin.inf.dpp.project.internal.ActivityQueuer.disableQueuing ( )

Disables the queuing for all projects. Currently queued activities will be flushed after the next invocation of process(List).

This method MUST be called at the end of an invitation process because it stops the queuing for all projects which at least releases the queued activities to prevent memory leaks. At the moment stopping the queuing for each project separately is not needed, since the projects are added after the invitation process at the same time. When multiple invitations at the same moment will be possible, this implementation needs to be changed.

synchronized void de.fu_berlin.inf.dpp.project.internal.ActivityQueuer.enableQueuing ( IProject  project)

Enables the queuing of serialized activities related to the given project.

Parameters:
project
synchronized List<IActivity> de.fu_berlin.inf.dpp.project.internal.ActivityQueuer.process ( List< IActivity activities)

Processes the incoming IActivity activities} and decides which activities should be queued. All IResourceActivity resource related activities} which relate to a project that is configured for queuing using enableQueuing(IProject) will be queued. The method returns all other activities which should not be queued.

If a flushing of the queue was previously requested by calling disableQueuing() than the method will return a list of all queued activities.

Parameters:
activities
Returns:
the activities that are not queued
 All Classes Namespaces Files Functions Variables Enumerations