Package com.ibm.di.queue
Class QNotification
- java.lang.Object
-
- java.lang.Thread
-
- com.ibm.di.queue.QNotification
-
- All Implemented Interfaces:
java.lang.Runnable
public class QNotification extends java.lang.Thread
-
-
Field Summary
Fields Modifier and Type Field Description static int
OP_AVAILABLE
static int
OP_EMPTY
static int
OP_FULL
-
Constructor Summary
Constructors Constructor Description QNotification(Log l, MemBufferQ src)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
register(QCallback a, int purpose)
register : registers a callback which will be called when memQ is empty/full/data available it is assumed that the callback implements the handle()functionvoid
run()
run : the thread run method issues full/empty/data available triggers to objects registered for respective triggersvoid
setPurpose(int p)
setPurpose set the operation that should be handledvoid
unregister(QCallback a, int purpose)
unregister : unregisters a callback-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
OP_FULL
public static final int OP_FULL
- See Also:
- Constant Field Values
-
OP_EMPTY
public static final int OP_EMPTY
- See Also:
- Constant Field Values
-
OP_AVAILABLE
public static final int OP_AVAILABLE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
QNotification
public QNotification(Log l, MemBufferQ src)
-
-
Method Detail
-
setPurpose
public void setPurpose(int p)
setPurpose set the operation that should be handled- Parameters:
p
- full/empty/data available
-
register
public void register(QCallback a, int purpose)
register : registers a callback which will be called when memQ is empty/full/data available it is assumed that the callback implements the handle()function- Parameters:
a
- object to be triggeredpurpose
- full/empty/data available
-
unregister
public void unregister(QCallback a, int purpose) throws java.lang.Exception
unregister : unregisters a callback- Parameters:
a
- object to be unregisteredpurpose
- full/empty/data available if -1 unregister the object from all callbacks- Throws:
java.lang.Exception
- if callback object is not found
-
run
public void run()
run : the thread run method issues full/empty/data available triggers to objects registered for respective triggers- Specified by:
run
in interfacejava.lang.Runnable
- Overrides:
run
in classjava.lang.Thread
-
-