public final class RogMessageLog extends RogObject implements IRogMessageLogger
IRogMessageLogger.ErrorHandler, IRogMessageLogger.IMessageReceiver, IRogMessageLogger.Stats| Modifier and Type | Field and Description |
|---|---|
static String |
PROP_AUTO_REPAIR |
static String |
PROP_DETACHED |
static String |
PROP_DETACHED_QUEUE_DEPTH |
static String |
PROP_DETACHED_QUEUE_DRAINER_CPU_AFFINITIZATION_MASK |
static String |
PROP_DETACHED_QUEUE_OFFER_STRATEGY |
static String |
PROP_DETACHED_QUEUE_WAIT_STRATEGY |
static String |
PROP_FLUSH_ON_COMMIT |
static String |
PROP_FLUSH_USING_MAPPED_MEMORY |
static String |
PROP_INITIAL_LOG_LENGTH |
static String |
PROP_INTEGRITY_CHECK |
static String |
PROP_LOG_EMPTINESS_EXPECTATION |
static String |
PROP_LOG_LOCATION |
static String |
PROP_LOG_MODE |
static String |
PROP_LOG_PRESENCE_EXPECTATION |
static String |
PROP_PAGE_SIZE |
static String |
PROP_READ_BUFFER_SIZE |
static String |
PROP_WRITE_BUFFER_SIZE |
static String |
PROP_ZERO_OUT_INITIAL |
getChecked, getThreaded, getTracerpublic static final String PROP_LOG_LOCATION
RogLog.PROP_STORE_ROOT,
Constant Field Valuespublic static final String PROP_LOG_MODE
RogLog.PROP_LOG_MODE,
Constant Field Valuespublic static final String PROP_LOG_PRESENCE_EXPECTATION
public static final String PROP_LOG_EMPTINESS_EXPECTATION
public static final String PROP_INTEGRITY_CHECK
RogLog.PROP_INTEGRITY_CHECK,
Constant Field Valuespublic static final String PROP_AUTO_REPAIR
RogLog.PROP_AUTO_REPAIR,
Constant Field Valuespublic static final String PROP_INITIAL_LOG_LENGTH
public static final String PROP_ZERO_OUT_INITIAL
public static final String PROP_READ_BUFFER_SIZE
public static final String PROP_WRITE_BUFFER_SIZE
public static final String PROP_PAGE_SIZE
RogLog.PROP_PAGE_SIZE,
Constant Field Valuespublic static final String PROP_FLUSH_ON_COMMIT
RogLog.PROP_FLUSH_ON_COMMIT,
Constant Field Valuespublic static final String PROP_FLUSH_USING_MAPPED_MEMORY
public static final String PROP_DETACHED
RogLog.PROP_DETACHED,
Constant Field Valuespublic static final String PROP_DETACHED_QUEUE_DEPTH
public static final String PROP_DETACHED_QUEUE_OFFER_STRATEGY
public static final String PROP_DETACHED_QUEUE_WAIT_STRATEGY
public static final String PROP_DETACHED_QUEUE_DRAINER_CPU_AFFINITIZATION_MASK
public static final RogMessageLog create(String name, Properties props)
name - The name of the logprops - Properties to configure the log.public static final RogMessageLog create(String name)
This method calls create(name, (Properties)null)
public final String getName()
IRogMessageLogger.getName()getName in interface IRogMessageLoggerpublic final void setErrorHandler(IRogMessageLogger.ErrorHandler errorHandler)
setErrorHandler in interface IRogMessageLoggerpublic final IRogMessageLogger.ErrorHandler getErrorHandler()
IRogMessageLogger.getErrorHandler()getErrorHandler in interface IRogMessageLoggerpublic final void open()
throws Exception
IRogMessageLogger.open()open in interface IRogMessageLoggerExceptionpublic final boolean isOpen()
IRogMessageLogger.isOpen()isOpen in interface IRogMessageLoggerpublic final boolean wasRepaired()
IRogMessageLogger.wasRepaired()wasRepaired in interface IRogMessageLoggerpublic final IRogMessageLogger.Stats getStats()
IRogMessageLogger.getStats()getStats in interface IRogMessageLoggerpublic final boolean isReadInProgress()
IRogMessageLogger.isReadInProgress()isReadInProgress in interface IRogMessageLoggerpublic final IRogMessage readAt(long pos)
IRogMessageLogger.readAt(long)readAt in interface IRogMessageLoggerpos - The position in the log the message frompublic final IRogMessage readOne()
IRogMessageLogger.readOne()readOne in interface IRogMessageLoggerpublic final void readFrom(long pos,
IRogMessageLogger.IMessageReceiver receiver)
IRogMessageLogger.readFrom(long, IMessageReceiver)readFrom in interface IRogMessageLoggerpos - The position in the log to read from. A value of 0 will
read the message from the beginning of the file.public final void read(IRogMessageLogger.IMessageReceiver receiver)
IRogMessageLogger.read(IMessageReceiver)read in interface IRogMessageLoggerpublic final void stopRead()
IRogMessageLogger.stopRead()stopRead in interface IRogMessageLoggerpublic final long getPositionInLog(IRogMessage message)
IRogMessageLogger.getPositionInLog(IRogMessage)getPositionInLog in interface IRogMessageLoggerpublic final int getSizeInLog(IRogMessage message)
IRogMessageLogger.getSizeInLog(IRogMessage)getSizeInLog in interface IRogMessageLoggerpublic final void log(IRogMessage message, boolean commitStart, boolean commitEnd, boolean sync)
IRogMessageLogger.log(IRogMessage, boolean, boolean, boolean)log in interface IRogMessageLoggermessage - The message to log.commitStart - Indicates whether to mark this log entry as
the start of an application commit leg.commitEnd - Indicates whether to mark this log entry as
the end of an application commit leg.sync - Indicates whether this write should trigger a flush
with a sync i.e. any data buffered in local memory by prior
calls to this method should be synchornously flushed through to
its destination i.e. cut through all intermediate caches and
buffers such as OS caches, CPU caches and network buffers to
it final destination.public final void log(IRogMessage message, boolean commitStart, boolean commitEnd)
IRogMessageLogger.log(IRogMessage, boolean, boolean)log in interface IRogMessageLoggerpublic final void log(IRogMessage message)
IRogMessageLogger.log(IRogMessage)log in interface IRogMessageLoggerpublic final void flush(boolean sync)
IRogMessageLogger.flush(boolean)flush in interface IRogMessageLoggersync - Indicates if the flush should sync to the durable mediapublic final void fail(Exception cause)
cause - The cause of the failure.
CAUTION: This method is only for testing purposes and should not be invoked outside of test frameworks.
This method invokes the error handler if installed and marks the log has failed. This will cause all subsequent commits or syncs to immediately fail with a runtime exception.
public final void delete()
throws IOException
IRogMessageLogger.delete()delete in interface IRogMessageLoggerIOExceptionpublic final void close()
IRogMessageLogger.close()close in interface IRogMessageLoggerCopyright © 2019 N5 Technologies, Inc. All Rights Reserved.