Package io.deephaven.io.log.impl
Class LogOutputBaseImpl
- java.lang.Object
-
- io.deephaven.io.log.impl.LogOutputBaseImpl
-
- All Implemented Interfaces:
io.deephaven.base.log.LogOutput,ByteBufferSink
- Direct Known Subclasses:
LogOutputCsvImpl
public abstract class LogOutputBaseImpl extends java.lang.Object implements io.deephaven.base.log.LogOutput, ByteBufferSink
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.deephaven.base.log.LogOutput
io.deephaven.base.log.LogOutput.LongFormatter, io.deephaven.base.log.LogOutput.Null, io.deephaven.base.log.LogOutput.ObjFormatter<T extends java.lang.Object>, io.deephaven.base.log.LogOutput.ObjIntIntFormatter<T extends java.lang.Object>, io.deephaven.base.log.LogOutput.ObjObjFormatter<T extends java.lang.Object,U extends java.lang.Object>
-
-
Field Summary
Fields Modifier and Type Field Description protected intbufferCountprotected LogBufferPoolbufferPoolprotected java.nio.ByteBuffer[]buffersprotected ByteBufferOutputStreamstream-
Fields inherited from interface io.deephaven.base.log.LogOutput
APPENDABLE_COLLECTION_FORMATTER, BASIC_FORMATTER, BOOLEAN_ARRAY_FORMATTER, INT_ARRAY_FORMATTER, LOCAL_DATE_TIME_FORMATTER, MILLIS_FROM_EPOCH_FORMATTER, millisFormatter, NULL, NULL_TERMINATED_STRING_FORMATTER, SOCKADDR_FORMATTER, STRING_ARRAY_FORMATTER, STRING_COLLECTION_FORMATTER
-
-
Constructor Summary
Constructors Constructor Description LogOutputBaseImpl(LogBufferPool bufferPool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.ByteBufferacceptBuffer(java.nio.ByteBuffer b, int need)Dispose of the contents of the buffer b, probably by writing them to a channel, and return a new buffer in which writing can continue.io.deephaven.base.log.LogOutputclear()io.deephaven.base.log.LogOutputclose()voidclose(java.nio.ByteBuffer b)Dispose of the contents of the final buffer in an output sequence, probably by writing them to a channel.java.nio.ByteBuffergetBuffer(int i)intgetBufferCount()intgetEndOfHeaderOffset()io.deephaven.base.log.LogOutputmarkEndOfHeader()intrelativeSize()intsize()io.deephaven.base.log.LogOutputstart()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.deephaven.base.log.LogOutput
append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, append, appendDouble, appendDouble, appendTimestamp, appendTimestampMicros, nf, nl
-
-
-
-
Field Detail
-
stream
protected final ByteBufferOutputStream stream
-
bufferPool
protected final LogBufferPool bufferPool
-
buffers
protected java.nio.ByteBuffer[] buffers
-
bufferCount
protected int bufferCount
-
-
Constructor Detail
-
LogOutputBaseImpl
public LogOutputBaseImpl(LogBufferPool bufferPool)
-
-
Method Detail
-
markEndOfHeader
public io.deephaven.base.log.LogOutput markEndOfHeader()
- Specified by:
markEndOfHeaderin interfaceio.deephaven.base.log.LogOutput
-
getEndOfHeaderOffset
public int getEndOfHeaderOffset()
- Specified by:
getEndOfHeaderOffsetin interfaceio.deephaven.base.log.LogOutput
-
acceptBuffer
public java.nio.ByteBuffer acceptBuffer(java.nio.ByteBuffer b, int need) throws java.io.IOExceptionDescription copied from interface:ByteBufferSinkDispose of the contents of the buffer b, probably by writing them to a channel, and return a new buffer in which writing can continue. The returned buffer must have at least need bytes of space remaining. The return value may be the same buffer, as long as it's remaining() value has been increased to be >= need.- Specified by:
acceptBufferin interfaceByteBufferSink- Parameters:
b- the buffer whose contents need to be disposed of.- Returns:
- the buffer in which further output should be written.
- Throws:
java.io.IOException
-
close
public void close(java.nio.ByteBuffer b) throws java.io.IOExceptionDescription copied from interface:ByteBufferSinkDispose of the contents of the final buffer in an output sequence, probably by writing them to a channel. Note that the argument buffer may be empty. Then do whatever it takes to release the resources of the sink, probably by closing a channel.- Specified by:
closein interfaceByteBufferSink- Throws:
java.io.IOException
-
start
public io.deephaven.base.log.LogOutput start()
- Specified by:
startin interfaceio.deephaven.base.log.LogOutput
-
close
public io.deephaven.base.log.LogOutput close()
- Specified by:
closein interfaceio.deephaven.base.log.LogOutput
-
relativeSize
public int relativeSize()
- Specified by:
relativeSizein interfaceio.deephaven.base.log.LogOutput
-
size
public int size()
- Specified by:
sizein interfaceio.deephaven.base.log.LogOutput
-
getBufferCount
public int getBufferCount()
- Specified by:
getBufferCountin interfaceio.deephaven.base.log.LogOutput
-
getBuffer
public java.nio.ByteBuffer getBuffer(int i)
- Specified by:
getBufferin interfaceio.deephaven.base.log.LogOutput
-
clear
public io.deephaven.base.log.LogOutput clear()
- Specified by:
clearin interfaceio.deephaven.base.log.LogOutput
-
-