Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Inherits Startable.
Classes | |
class | ActivityBuffer< T > |
class | SequencedActivities |
Public Member Functions | |
ActivitySequencer (final ISarosSession sarosSession, final ITransmitter transmitter, final IReceiver receiver, final DispatchThreadContext threadContext) | |
void | start () |
void | stop () |
void | setCallback (IActivitySequencerCallback callback) |
void | sendActivity (List< User > recipients, final IActivity activity) |
void | registerUser (User user) |
void | unregisterUser (User user) |
void | flush (User user) |
Package Functions | |
boolean | isUserRegistered (User user) |
The ActivitySequencer is responsible for making sure that transformed IActivity activities} are sent and received in the right order.
de.fu_berlin.inf.dpp.project.internal.ActivitySequencer.ActivitySequencer | ( | final ISarosSession | sarosSession, |
final ITransmitter | transmitter, | ||
final IReceiver | receiver, | ||
final DispatchThreadContext | threadContext | ||
) |
void de.fu_berlin.inf.dpp.project.internal.ActivitySequencer.flush | ( | User | user | ) |
Waits until all buffered activities for the specific user are sent. Calling sendActivity at the same time may or may not ignore those new activities.
user |
boolean de.fu_berlin.inf.dpp.project.internal.ActivitySequencer.isUserRegistered | ( | User | user | ) | [package] |
For testing purposes only.
user |
void de.fu_berlin.inf.dpp.project.internal.ActivitySequencer.registerUser | ( | User | user | ) |
Registers a user with the sequencer allowing the sending and receiving to and from this user. The local user of a session does not need to be registered as it is always allowed to send activities to the local user itself.
user |
void de.fu_berlin.inf.dpp.project.internal.ActivitySequencer.sendActivity | ( | List< User > | recipients, |
final IActivity | activity | ||
) |
Sends an activity to the given recipients.
void de.fu_berlin.inf.dpp.project.internal.ActivitySequencer.setCallback | ( | IActivitySequencerCallback | callback | ) |
void de.fu_berlin.inf.dpp.project.internal.ActivitySequencer.start | ( | ) |
Starts the sequencer. After the sequencer is started activities can be send and received. The sequencer can only be started once.
IllegalStateException | if the sequencer is already started |
void de.fu_berlin.inf.dpp.project.internal.ActivitySequencer.stop | ( | ) |
Stops the sequencer. After the sequencer is stopped activities can no longer be send and received.
IllegalStateException | if the sequencer is not started |
void de.fu_berlin.inf.dpp.project.internal.ActivitySequencer.unregisterUser | ( | User | user | ) |
Unregisters a user from the sequencer disallowing the sending and receiving to and from this user.
user |