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 class
TargetedDataFileAppender.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 void
close()
boolean
isPreallocate()
void
setPreallocate(boolean preallocate)
Location
storeItem(ByteSequence data, byte type, boolean sync)
Location
storeItem(ByteSequence data, byte type, Runnable onComplete)
-
-
-
Method Detail
-
storeItem
public Location storeItem(ByteSequence data, byte type, boolean sync) throws IOException
- Specified by:
storeItem
in interfaceFileAppender
- Throws:
IOException
-
storeItem
public Location storeItem(ByteSequence data, byte type, Runnable onComplete) throws IOException
- Specified by:
storeItem
in interfaceFileAppender
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceFileAppender
- Throws:
IOException
-
isPreallocate
public boolean isPreallocate()
-
setPreallocate
public void setPreallocate(boolean preallocate)
-
-