Class TargetedDataFileAppender
- java.lang.Object
-
- org.apache.activemq.store.kahadb.disk.journal.TargetedDataFileAppender
-
- All Implemented Interfaces:
AutoCloseable,FileAppender
public class TargetedDataFileAppender extends Object implements FileAppender
File Appender instance that performs batched writes in the thread where the write is queued. This appender does not honor the maxFileLength value in the journal as the files created here are out-of-band logs used for other purposes such as journal level compaction.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classTargetedDataFileAppender.WriteBatch
-
Field Summary
-
Fields inherited from interface org.apache.activemq.store.kahadb.disk.journal.FileAppender
maxStat, PROPERTY_LOG_WRITE_STAT_WINDOW
-
-
Constructor Summary
Constructors Constructor Description TargetedDataFileAppender(Journal journal, DataFile target)Construct a Store writer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanisPreallocate()voidsetPreallocate(boolean preallocate)LocationstoreItem(ByteSequence data, byte type, boolean sync)LocationstoreItem(ByteSequence data, byte type, Runnable onComplete)
-
-
-
Method Detail
-
storeItem
public Location storeItem(ByteSequence data, byte type, boolean sync) throws IOException
- Specified by:
storeItemin interfaceFileAppender- Throws:
IOException
-
storeItem
public Location storeItem(ByteSequence data, byte type, Runnable onComplete) throws IOException
- Specified by:
storeItemin interfaceFileAppender- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceFileAppender- Throws:
IOException
-
isPreallocate
public boolean isPreallocate()
-
setPreallocate
public void setPreallocate(boolean preallocate)
-
-