Package org.eclipse.net4j.util.om.log
Class RollingLog
java.lang.Object
org.eclipse.net4j.util.event.Notifier
org.eclipse.net4j.util.lifecycle.Lifecycle
org.eclipse.net4j.util.concurrent.Worker
org.eclipse.net4j.util.om.log.RollingLog
- All Implemented Interfaces:
Iterable<RollingLog.LogLine>,INotifier,INotifier.INotifier2,IDeactivateable,ILifecycle,ILifecycle.DeferrableActivation,Log
- Since:
- 3.8
- Author:
- Eike Stepper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classstatic final classstatic classstatic final classNested classes/interfaces inherited from class org.eclipse.net4j.util.concurrent.Worker
Worker.Terminate, Worker.WorkContextNested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle
ILifecycle.DeferrableActivationNested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
INotifier.INotifier2 -
Field Summary
Fields inherited from class org.eclipse.net4j.util.concurrent.Worker
DEFAULT_ERROR_HANDLER, DEFAULT_TIMEOUT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidcommit()protected RollingLog.LogLinecreateLogLine(String message) protected voidprotected voidfinal intfinal Stringfinal longfinal longprotected Stringlongbooleaniterator()static CloseableIterator<RollingLog.LogLine>protected voidload(Properties properties) final voidstatic voidprotected voidrecovery(Properties properties, RollingLog.LogLine logLine) protected voidsave(Properties properties) voidsetWriteBulk(boolean writeBulk) voidsetWriteInterval(long writeInterval) toString()protected final voidwork(Worker.WorkContext context) protected voidwriteLogLine(RollingLog.LogLine logLine, PrintStream out) protected longwriteLogLines(List<RollingLog.LogLine> logLines) protected longwriteLogLines(List<RollingLog.LogLine> logLines, PrintStream out) Methods inherited from class org.eclipse.net4j.util.concurrent.Worker
getActivationTimeout, getDeactivationTimeout, getGlobalErrorHandler, getThreadName, getWorkerThread, handleError, isDaemon, setActivationTimeout, setDaemon, setDeactivationTimeout, setGlobalErrorHandlerMethods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivationMethods inherited from class org.eclipse.net4j.util.event.Notifier
addListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListenerMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
RollingLog
-
-
Method Details
-
getLogFile
-
getLogSize
public final long getLogSize() -
getLogLineCounter
public final long getLogLineCounter() -
getFileNumber
public final int getFileNumber() -
getWriteInterval
public long getWriteInterval() -
setWriteInterval
public void setWriteInterval(long writeInterval) -
isWriteBulk
public boolean isWriteBulk() -
setWriteBulk
public void setWriteBulk(boolean writeBulk) -
log
-
commit
- Throws:
InterruptedException
-
work
-
createLogLine
-
writeLogLines
-
writeLogLines
-
writeLogLine
-
getThreadInfo
-
doActivate
- Overrides:
doActivatein classWorker- Throws:
Exception
-
doDeactivate
- Overrides:
doDeactivatein classWorker- Throws:
Exception
-
recovery
-
load
-
save
-
toString
-
iterator
- Specified by:
iteratorin interfaceIterable<RollingLog.LogLine>
-
iterator
-
main
-