|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object biz.chitec.quarterback.util.Logger biz.chitec.quarterback.util.UpdateableLogger
Logging object with update facility. Any registered LoggingReceiver can request an "update" of itself. For this, it is taken out of the normal stream of logging information and added to a special thread which gathers any information to send to the receiver.
The UpdateableLogger gets a special LoggingReceiverUpdater object to send the data needed for an update to the receiver.
Nested Class Summary |
Nested classes inherited from class biz.chitec.quarterback.util.Logger |
Logger.ChainElem |
Field Summary | |
protected LoggingReceiverUpdaterFactory |
lruf
The factory for the updaters. |
protected java.util.Map |
updaters
The updater list. |
Fields inherited from class biz.chitec.quarterback.util.Logger |
first, handleloophandler, receiverexpr, receivers, sleeping, worked |
Constructor Summary | |
UpdateableLogger()
Simple constructor. |
|
UpdateableLogger(LoggingReceiverUpdaterFactory lrufx)
Constructor with dirct call to set updater factory. |
Method Summary | |
void |
cancelUpdate(LoggingReceiver lr)
Cancel a certain update immideately. |
protected void |
doSendInHandleLoop(java.lang.Object o,
LoggingReceiver receiver,
long ts,
int seqnr)
Send data to one receiver, Handle loop part. |
void |
finishUpdateDelayedSending(LoggingReceiver lr)
Finishes sending of delayed data to an updated reveicer. |
boolean |
removeReceiver(LoggingReceiver lr)
Removes the receiver. |
void |
setLoggingReceiverUpdaterFactory(LoggingReceiverUpdaterFactory lrufx)
Set the updater factory. |
void |
stopUpdate(LoggingReceiver lr)
Stop the update. |
void |
updateReceiver(LoggingReceiver lr)
Initiates an update for a certain receiver. |
Methods inherited from class biz.chitec.quarterback.util.Logger |
addReceiver, addReceiver, containsReceiver, continueHandleLogObject, doSendToReceiver, emergencyRemoveReceiver, handleLogObject, handleloop, logObject, logObject, logObject, logObjectToSenderOnly, nothingToHandle, removeReceiver |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Map updaters
protected LoggingReceiverUpdaterFactory lruf
Constructor Detail |
public UpdateableLogger()
public UpdateableLogger(LoggingReceiverUpdaterFactory lrufx)
Method Detail |
public void setLoggingReceiverUpdaterFactory(LoggingReceiverUpdaterFactory lrufx)
public boolean removeReceiver(LoggingReceiver lr)
removeReceiver
in class Logger
lr
- Receiver to remove.
protected void doSendInHandleLoop(java.lang.Object o, LoggingReceiver receiver, long ts, int seqnr)
This method locks the keeperinterface.
doSendInHandleLoop
in class Logger
o
- Message object to logts
- timestamp for UpdateableLoggerseqnr
- Sequence counter for TransactionLoggerpublic void finishUpdateDelayedSending(LoggingReceiver lr)
Note that while updaters is locked, nothing is written to any receiver. Therefore, writing the data should not take too long.
This method should be called by the updater himself only after it has finished its whole update and must now bring the receiver up to date with any delayed data.
public void updateReceiver(LoggingReceiver lr)
This method must not be called from inside the handle loop of the Logger to prevent deadlocks!
public void stopUpdate(LoggingReceiver lr)
public void cancelUpdate(LoggingReceiver lr)
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |