public abstract class AbstractSequentialFileFactory extends Object implements SequentialFileFactory
| Modifier and Type | Field and Description |
|---|---|
protected int |
bufferSize |
protected long |
bufferTimeout |
protected static int |
EXECUTOR_TIMEOUT |
protected String |
journalDir |
protected TimedBuffer |
timedBuffer |
protected ExecutorService |
writeExecutor
Asynchronous writes need to be done at another executor.
|
| Constructor and Description |
|---|
AbstractSequentialFileFactory(String journalDir,
boolean buffered,
int bufferSize,
int bufferTimeout,
boolean logRates,
IOCriticalErrorListener criticalErrorListener) |
| Modifier and Type | Method and Description |
|---|---|
void |
activateBuffer(SequentialFile file) |
void |
createDirs()
Create the directory if it doesn't exist yet
|
void |
deactivateBuffer() |
void |
flush() |
String |
getDirectory() |
List<String> |
listFiles(String extension) |
void |
onIOError(int errorCode,
String message,
SequentialFile file)
The SequentialFile will call this method when a disk IO Error happens during the live phase.
|
void |
releaseBuffer(ByteBuffer buffer) |
void |
start() |
void |
stop() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitallocateDirectBuffer, calculateBlockSize, clearBuffer, createSequentialFile, getAlignment, isSupportsCallbacks, newBuffer, releaseDirectBuffer, wrapBufferprotected static final int EXECUTOR_TIMEOUT
protected final String journalDir
protected final TimedBuffer timedBuffer
protected final int bufferSize
protected final long bufferTimeout
protected ExecutorService writeExecutor
public AbstractSequentialFileFactory(String journalDir, boolean buffered, int bufferSize, int bufferTimeout, boolean logRates, IOCriticalErrorListener criticalErrorListener)
public void stop()
stop in interface SequentialFileFactorypublic String getDirectory()
getDirectory in interface SequentialFileFactorypublic void start()
start in interface SequentialFileFactorypublic void onIOError(int errorCode,
String message,
SequentialFile file)
SequentialFileFactoryonIOError in interface SequentialFileFactorypublic void activateBuffer(SequentialFile file)
activateBuffer in interface SequentialFileFactorypublic void flush()
flush in interface SequentialFileFactorypublic void deactivateBuffer()
deactivateBuffer in interface SequentialFileFactorypublic void releaseBuffer(ByteBuffer buffer)
releaseBuffer in interface SequentialFileFactorypublic void createDirs()
throws Exception
createDirs in interface SequentialFileFactoryExceptionCopyright © 2012 JBoss by Red Hat. All Rights Reserved.