Class FlushManager
- java.lang.Object
-
- de.desy.mst.libs.framework.mstapp.logging.appender.FlushManager
-
public class FlushManager extends java.lang.Object
Wann soll der Buffer von ALogAppenderBuffered geflushed werden?- Version:
- 1.0.0
- Author:
- ws
-
-
Constructor Summary
Constructors Constructor Description FlushManager(IFlushable theFlushable, int maxBufferSize, long maxBufferTimeInMS)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Falls nicht mehr gebraucht aufrufen (beended Thread & maxBufferSize = 1boolean
fireNewBuffersize(int bufferSize)
int
getMaxBufferSize()
long
getMaxBufferTimeInMS()
IFlushable
getTheFlushable()
boolean
isClosed()
void
setMaxBufferSize(int size)
void
setMaxBufferTime(int msTime)
-
-
-
Constructor Detail
-
FlushManager
public FlushManager(IFlushable theFlushable, int maxBufferSize, long maxBufferTimeInMS)
- Parameters:
theFlushable
- not nullmaxBufferSize
- sobald maxBufferSize erreicht ist: doFlush == truemaxBufferTimeInMS
- nach maxBufferTimeInMS ms: ist doFlush == true Werte kleiner gleich null == kein flush Thread
-
-
Method Detail
-
fireNewBuffersize
public boolean fireNewBuffersize(int bufferSize)
- Parameters:
bufferSize
-- Returns:
- true falls flush gerufen worden, sonst false
-
getTheFlushable
public final IFlushable getTheFlushable()
-
getMaxBufferSize
public final int getMaxBufferSize()
-
setMaxBufferSize
public final void setMaxBufferSize(int size)
-
getMaxBufferTimeInMS
public final long getMaxBufferTimeInMS()
-
setMaxBufferTime
public final void setMaxBufferTime(int msTime)
-
close
public void close()
Falls nicht mehr gebraucht aufrufen (beended Thread & maxBufferSize = 1
-
isClosed
public boolean isClosed()
-
-