org.eclipse.emf.emfstore.internal.client.model.changeTracking.notification.recording
Class NotificationRecorder

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.client.model.changeTracking.notification.recording.NotificationRecorder

public class NotificationRecorder
extends Object

A Notification recorder is meant to generate a NotificationRecording. To create the recording just repeatedly call record() with incoming EMF notifications.

Author:
chodnick

Constructor Summary
NotificationRecorder()
           
 
Method Summary
 NotificationRecording getRecording()
          Returns a completed notification recording, may throw IllegalStateException in case the recording is requested while recording still takes place, i.e.
 boolean isRecordingComplete()
           
 void newRecording()
          Starts a new recording.
 void newRecording(NotificationRecordingHint aHint)
          Starts a new recording.
 void record(org.eclipse.emf.common.notify.Notification n)
          Records a new EMF Notification.
 void stopRecording()
          Tries to stop an ongoing recording, useful only in context of delete operations, in which multiple EMF notification chains are recorded as a single sequence.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotificationRecorder

public NotificationRecorder()
Method Detail

record

public void record(org.eclipse.emf.common.notify.Notification n)
Records a new EMF Notification.

Parameters:
n - the notification to record

getRecording

public NotificationRecording getRecording()
Returns a completed notification recording, may throw IllegalStateException in case the recording is requested while recording still takes place, i.e. the EMF notification chain is not completed yet.

Returns:
a completed notification recording if one is ready

stopRecording

public void stopRecording()
Tries to stop an ongoing recording, useful only in context of delete operations, in which multiple EMF notification chains are recorded as a single sequence.


newRecording

public void newRecording()
Starts a new recording.


newRecording

public void newRecording(NotificationRecordingHint aHint)
Starts a new recording.

Parameters:
aHint - the hint to use when creating the new recording.

isRecordingComplete

public boolean isRecordingComplete()
Returns:
true if current recording is completed and closed, false otherwise


Copyright © 2015. All Rights Reserved.