com.continuent.tungsten.replicator
Class ErrorNotification

java.lang.Object
  extended by com.continuent.tungsten.fsm.core.Event
      extended by com.continuent.tungsten.replicator.ErrorNotification
All Implemented Interfaces:
com.continuent.tungsten.fsm.event.CriticalEvent, com.continuent.tungsten.fsm.event.OutOfBandEvent

public class ErrorNotification
extends com.continuent.tungsten.fsm.core.Event
implements com.continuent.tungsten.fsm.event.OutOfBandEvent, com.continuent.tungsten.fsm.event.CriticalEvent

This class defines a ErrorNotification, which denotes a severe replication error that causes replication to fail. It implements the OutOfBandEvent interface to ensure it is processed out-of-band no matter how it is submitted to the state machine. It also implements critical event so that event processing is not interrupted, which prevents race conditions around shutdown.

Version:
1.0
Author:
Teemu Ollakka

Constructor Summary
ErrorNotification(java.lang.String userMessage, long seqno, java.lang.String eventId, java.lang.Throwable e)
          Creates an error notification with user, a message, and replication position information.
ErrorNotification(java.lang.String userMessage, java.lang.Throwable e)
          Create new instance with underlying error and message for presentation to users.
 
Method Summary
 java.lang.String getEventId()
          Returns the native event ID associated with failure or null if there is no such ID.
 long getSeqno()
          Returns the log sequence number associated with failure or -1 if there is no such number.
 java.lang.Throwable getThrowable()
          Returns the original source of the error.
 java.lang.String getUserMessage()
          Returns a message suitable for users.
 
Methods inherited from class com.continuent.tungsten.fsm.core.Event
getData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ErrorNotification

public ErrorNotification(java.lang.String userMessage,
                         java.lang.Throwable e)
Create new instance with underlying error and message for presentation to users.


ErrorNotification

public ErrorNotification(java.lang.String userMessage,
                         long seqno,
                         java.lang.String eventId,
                         java.lang.Throwable e)
Creates an error notification with user, a message, and replication position information.

Method Detail

getThrowable

public java.lang.Throwable getThrowable()
Returns the original source of the error.


getUserMessage

public java.lang.String getUserMessage()
Returns a message suitable for users.


getSeqno

public long getSeqno()
Returns the log sequence number associated with failure or -1 if there is no such number.


getEventId

public java.lang.String getEventId()
Returns the native event ID associated with failure or null if there is no such ID.