Package com.illumon.iris.binarystore
Class RollingFileManager
java.lang.Object
com.illumon.iris.binarystore.RollingFileWriterBase<ExpirationType,ExtraType>
com.illumon.iris.binarystore.RollingFileManagerBase<String,Void>
com.illumon.iris.binarystore.RollingFileManager
- All Implemented Interfaces:
ChannelManager,ChannelManagerStandard,Closeable,AutoCloseable
Deprecated.
This class maintains the file channels, with the appropriate roll interval for BinaryStoreWriters.
Each call to
getChannel() evaluates the current time, and might re-initialize the channel.
This class adds a time suffix to the configured location and file prefix.
For example,
"/db/TempFiles/irisadmin/logs", "DbInternal.UpdatePerformanceLog.localhost.bin.2018-04-16."
to specify the log directory and file prefix
or
"/db/TempFiles/irisadmin/logs/DbInternal.UpdatePerformanceLog.localhost.bin.2018-04-16."
to specify the directory and prefix together.-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.binarystore.RollingFileManagerBase
RollingFileManagerBase.ExistingFilePolicy -
Field Summary
Fields inherited from class com.illumon.iris.binarystore.RollingFileWriterBase
baseDir, expiration, headerBuffer, writeChannel -
Constructor Summary
ConstructorsConstructorDescriptionRollingFileManager(com.fishlib.io.logger.Logger log, String baseDirName, String filenamePrefix, ByteBuffer headerBuffer, RollingFileManagerBase.ExistingFilePolicy existingFilePolicy, ExpirationManager<String> expirationManager) Deprecated.RollingFileManager(com.fishlib.io.logger.Logger log, String baseDirName, String filenamePrefix, ByteBuffer headerBuffer, DateTimeFormatter rollFormat, RollingFileManagerBase.ExistingFilePolicy existingFilePolicy) Deprecated.Create a ChannelManager that will change files on the hour.RollingFileManager(String basePath, ByteBuffer headerBuffer, DateTimeFormatter rollFormat, RollingFileManagerBase.ExistingFilePolicy existingFilePolicy, com.fishlib.io.logger.Logger log) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.For ChannelManager implementations that don't support dynamic column partition determination, the channel is based on pre-determined criteria.protected StringmakeFilename(String value, Void ignored) Deprecated.Construct the complete filename using the changing part passed in.Methods inherited from class com.illumon.iris.binarystore.RollingFileManagerBase
defaultClock, defaultCloseBehavior, defaultHeaderBehavior, flushMethods inherited from class com.illumon.iris.binarystore.RollingFileWriterBase
close, force, getChannelNow, initChannel, isChannelValid, reopenChannelMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.binarystore.ChannelManager
close
-
Constructor Details
-
RollingFileManager
public RollingFileManager(com.fishlib.io.logger.Logger log, @NotNull String baseDirName, @NotNull String filenamePrefix, @NotNull ByteBuffer headerBuffer, @Nullable DateTimeFormatter rollFormat, @NotNull RollingFileManagerBase.ExistingFilePolicy existingFilePolicy) Deprecated.Create a ChannelManager that will change files on the hour.- Parameters:
log- the LoggerbaseDirName- log files will be placed in this directoryfilenamePrefix- log files will begin with this prefix and end with the time according to rollFormatheaderBuffer- this buffer will be written to all new filesrollFormat- the current time will be formatted according to this formatterexistingFilePolicy- determines how existing files will be treated
-
RollingFileManager
public RollingFileManager(com.fishlib.io.logger.Logger log, @NotNull String baseDirName, @NotNull String filenamePrefix, @NotNull ByteBuffer headerBuffer, @NotNull RollingFileManagerBase.ExistingFilePolicy existingFilePolicy, @NotNull ExpirationManager<String> expirationManager) Deprecated. -
RollingFileManager
@Deprecated public RollingFileManager(String basePath, ByteBuffer headerBuffer, DateTimeFormatter rollFormat, RollingFileManagerBase.ExistingFilePolicy existingFilePolicy, com.fishlib.io.logger.Logger log) Deprecated.Translating constructor for backward compatibility.
-
-
Method Details
-
makeFilename
Deprecated.Description copied from class:RollingFileWriterBaseConstruct the complete filename using the changing part passed in.- Specified by:
makeFilenamein classRollingFileWriterBase<String,Void> - Parameters:
value- the changing portion of the filename based on our expirationignored- the changing portion of the filename based on our caller- Returns:
- the filename, possibly combining other data with the value
-
getChannel
Deprecated.Description copied from interface:ChannelManagerStandardFor ChannelManager implementations that don't support dynamic column partition determination, the channel is based on pre-determined criteria. The channel may still change, but not dynamically based on data that the ChannelManager user determines.- Returns:
- a non-null, open
GatheringByteChannel - Throws:
IOException- if the call encounters an error
-
RollingFileManager(Logger, String, String, ByteBuffer, DateTimeFormatter, ExistingFilePolicy)