Package com.illumon.iris.db.v2.utils
Class AbstractNotification
java.lang.Object
com.illumon.iris.db.v2.utils.AbstractNotification
- All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable
,NotificationQueue.Notification
,IntrusiveDoublyLinkedNode<NotificationQueue.Notification>
,Runnable
- Direct Known Subclasses:
AbstractIndexUpdateNotification
,InstrumentedListenerBase.ErrorNotification
,NotificationWrapper
,TerminalNotification
,WaitNotification
public abstract class AbstractNotification extends Object implements NotificationQueue.Notification
Common base class for notifications.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.util.datastructures.linked.IntrusiveDoublyLinkedNode
IntrusiveDoublyLinkedNode.Adapter<NODE_TYPE extends IntrusiveDoublyLinkedNode<NODE_TYPE>>, IntrusiveDoublyLinkedNode.Impl<NODE_TYPE extends IntrusiveDoublyLinkedNode.Impl<NODE_TYPE>>
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractNotification(boolean isTerminal)
-
Method Summary
Modifier and Type Method Description com.fishlib.base.log.LogOutput
append(com.fishlib.base.log.LogOutput output)
NotificationQueue.Notification
getNext()
Get the next node after this node.NotificationQueue.Notification
getPrev()
Get the previous node before this node.boolean
isTerminal()
Terminal notifications guarantee that they will not queue additional notifications or mutate data structures that should result in additional notifications.boolean
mustExecuteWithLtmLock()
If a terminal notification must be executed on the main LTM thread, it must override this method, so that the notification is not executed on the refresh pool.void
setNext(NotificationQueue.Notification other)
Set this node's next node.void
setPrev(NotificationQueue.Notification other)
Set this node's previous node.String
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.illumon.iris.db.tables.live.NotificationQueue.Notification
canExecute
-
Constructor Details
-
AbstractNotification
protected AbstractNotification(boolean isTerminal)
-
-
Method Details
-
mustExecuteWithLtmLock
public boolean mustExecuteWithLtmLock()Description copied from interface:NotificationQueue.Notification
If a terminal notification must be executed on the main LTM thread, it must override this method, so that the notification is not executed on the refresh pool. It is an error to return true if this notification is not terminal- Specified by:
mustExecuteWithLtmLock
in interfaceNotificationQueue.Notification
- Returns:
- true if this notification must be executed directly under the protection of the LTM lock
-
toString
-
append
public com.fishlib.base.log.LogOutput append(com.fishlib.base.log.LogOutput output)- Specified by:
append
in interfacecom.fishlib.base.log.LogOutputAppendable
-
isTerminal
public boolean isTerminal()Description copied from interface:NotificationQueue.Notification
Terminal notifications guarantee that they will not queue additional notifications or mutate data structures that should result in additional notifications. They are in turn guaranteed to be called after all non-terminal notifications for a given cycle through the notification queue.- Specified by:
isTerminal
in interfaceNotificationQueue.Notification
- Returns:
- True iff this notification is terminal.
-
getNext
Description copied from interface:IntrusiveDoublyLinkedNode
Get the next node after this node.- Specified by:
getNext
in interfaceIntrusiveDoublyLinkedNode<NotificationQueue.Notification>
- Returns:
- This node's next node
-
setNext
Description copied from interface:IntrusiveDoublyLinkedNode
Set this node's next node.- Specified by:
setNext
in interfaceIntrusiveDoublyLinkedNode<NotificationQueue.Notification>
- Parameters:
other
- This node's new next node
-
getPrev
Description copied from interface:IntrusiveDoublyLinkedNode
Get the previous node before this node.- Specified by:
getPrev
in interfaceIntrusiveDoublyLinkedNode<NotificationQueue.Notification>
- Returns:
- This node's previous node
-
setPrev
Description copied from interface:IntrusiveDoublyLinkedNode
Set this node's previous node.- Specified by:
setPrev
in interfaceIntrusiveDoublyLinkedNode<NotificationQueue.Notification>
- Parameters:
other
- This node's new previous node
-