public class RollingRandomAccessFileManager extends RollingFileManager
ByteBuffer and a RandomAccessFile to do the
I/O.| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BUFFER_SIZE
The default buffer size
|
layoutcount, LOGGER| Constructor and Description |
|---|
RollingRandomAccessFileManager(RandomAccessFile raf,
String fileName,
String pattern,
OutputStream os,
boolean append,
boolean immediateFlush,
int bufferSize,
long size,
long time,
TriggeringPolicy policy,
RolloverStrategy strategy,
String advertiseURI,
Layout<? extends Serializable> layout) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
createFileAfterRollover() |
void |
flush()
Flushes any buffers.
|
int |
getBufferSize()
Returns the buffer capacity.
|
static RollingRandomAccessFileManager |
getRollingRandomAccessFileManager(String fileName,
String filePattern,
boolean isAppend,
boolean immediateFlush,
int bufferSize,
TriggeringPolicy policy,
RolloverStrategy strategy,
String advertiseURI,
Layout<? extends Serializable> layout) |
Boolean |
isEndOfBatch() |
void |
setEndOfBatch(boolean isEndOfBatch) |
protected void |
write(byte[] bytes,
int offset,
int length)
Some output streams synchronize writes while others do not.
|
checkRollover, getFileManager, getFileSize, getFileTime, getPatternProcessor, getRolloverStrategy, getTriggeringPolicygetContentFormat, getFileManager, getFileName, isAppend, isLockinggetManager, getOutputStream, isOpen, releaseSub, setOutputStream, write, writeFootergetCount, getName, hasManager, releasepublic static final int DEFAULT_BUFFER_SIZE
public RollingRandomAccessFileManager(RandomAccessFile raf, String fileName, String pattern, OutputStream os, boolean append, boolean immediateFlush, int bufferSize, long size, long time, TriggeringPolicy policy, RolloverStrategy strategy, String advertiseURI, Layout<? extends Serializable> layout)
public static RollingRandomAccessFileManager getRollingRandomAccessFileManager(String fileName, String filePattern, boolean isAppend, boolean immediateFlush, int bufferSize, TriggeringPolicy policy, RolloverStrategy strategy, String advertiseURI, Layout<? extends Serializable> layout)
public Boolean isEndOfBatch()
public void setEndOfBatch(boolean isEndOfBatch)
protected void write(byte[] bytes,
int offset,
int length)
OutputStreamManagerwrite in class RollingFileManagerbytes - The serialized Log event.offset - The offset into the byte array.length - The number of bytes to write.protected void createFileAfterRollover()
throws IOException
createFileAfterRollover in class RollingFileManagerIOExceptionpublic void flush()
OutputStreamManagerflush in class OutputStreamManagerpublic void close()
close in class OutputStreamManagerpublic int getBufferSize()
getBufferSize in class FileManagerCopyright © 1999-2021 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.