Class JDBCSequentialFileFactory
java.lang.Object
org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFileFactory
- All Implemented Interfaces:
org.apache.activemq.artemis.core.io.SequentialFileFactory, org.apache.activemq.artemis.core.server.ActiveMQComponent
public class JDBCSequentialFileFactory
extends Object
implements org.apache.activemq.artemis.core.io.SequentialFileFactory, org.apache.activemq.artemis.core.server.ActiveMQComponent
-
Constructor Summary
ConstructorsConstructorDescriptionJDBCSequentialFileFactory(JDBCConnectionProvider connectionProvider, SQLProvider sqlProvider, Executor executor, ScheduledExecutorService scheduledExecutorService, long syncDelay, org.apache.activemq.artemis.core.io.IOCriticalErrorListener criticalErrorListener) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivateBuffer(org.apache.activemq.artemis.core.io.SequentialFile file) allocateDirectBuffer(int size) intcalculateBlockSize(int bytes) voidclearBuffer(ByteBuffer buffer) voidorg.apache.activemq.artemis.core.io.SequentialFilecreateSequentialFile(String fileName) voidvoiddestroy()voidflush()intlongintgetMaxIO()intbooleanbooleanbooleannewBuffer(int size) voidvoidreleaseBuffer(ByteBuffer buffer) voidreleaseDirectBuffer(ByteBuffer buffer) voidsequentialFileClosed(org.apache.activemq.artemis.core.io.SequentialFile file) setAlignment(int alignment) org.apache.activemq.artemis.core.io.SequentialFileFactorysetDatasync(boolean enabled) voidstart()voidstop()booleanwrapBuffer(byte[] bytes) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.activemq.artemis.core.server.ActiveMQComponent
asyncStopMethods inherited from interface org.apache.activemq.artemis.core.io.SequentialFileFactory
createSequentialFile, deleteFolder, getCriticalAnalyzer, getCriticalErrorListener, isSyncSupported, newBuffer, onIOError, onIOError, setCriticalErrorListener
-
Constructor Details
-
JDBCSequentialFileFactory
public JDBCSequentialFileFactory(JDBCConnectionProvider connectionProvider, SQLProvider sqlProvider, Executor executor, ScheduledExecutorService scheduledExecutorService, long syncDelay, org.apache.activemq.artemis.core.io.IOCriticalErrorListener criticalErrorListener) throws Exception - Throws:
Exception
-
-
Method Details
-
supportsIndividualContext
public boolean supportsIndividualContext()- Specified by:
supportsIndividualContextin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
getDbDriver
-
setDatasync
public org.apache.activemq.artemis.core.io.SequentialFileFactory setDatasync(boolean enabled) - Specified by:
setDatasyncin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
isDatasync
public boolean isDatasync()- Specified by:
isDatasyncin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
getBufferSize
public long getBufferSize()- Specified by:
getBufferSizein interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
start
public void start()- Specified by:
startin interfaceorg.apache.activemq.artemis.core.server.ActiveMQComponent- Specified by:
startin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
stop
public void stop()- Specified by:
stopin interfaceorg.apache.activemq.artemis.core.server.ActiveMQComponent- Specified by:
stopin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
createSequentialFile
- Specified by:
createSequentialFilein interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
sequentialFileClosed
public void sequentialFileClosed(org.apache.activemq.artemis.core.io.SequentialFile file) -
getNumberOfOpenFiles
public int getNumberOfOpenFiles() -
getMaxIO
public int getMaxIO()- Specified by:
getMaxIOin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
listFiles
-
isSupportsCallbacks
public boolean isSupportsCallbacks()- Specified by:
isSupportsCallbacksin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
onIOError
-
allocateDirectBuffer
- Specified by:
allocateDirectBufferin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
releaseDirectBuffer
- Specified by:
releaseDirectBufferin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
newBuffer
- Specified by:
newBufferin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
clearBuffer
- Specified by:
clearBufferin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
wrapBuffer
- Specified by:
wrapBufferin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
getAlignment
public int getAlignment()- Specified by:
getAlignmentin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
setAlignment
- Specified by:
setAlignmentin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
calculateBlockSize
public int calculateBlockSize(int bytes) - Specified by:
calculateBlockSizein interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
deactivateBuffer
public void deactivateBuffer()- Specified by:
deactivateBufferin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
releaseBuffer
- Specified by:
releaseBufferin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
activateBuffer
public void activateBuffer(org.apache.activemq.artemis.core.io.SequentialFile file) - Specified by:
activateBufferin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
getDirectory
- Specified by:
getDirectoryin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
getDirectoryName
- Specified by:
getDirectoryNamein interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
isStarted
public boolean isStarted()- Specified by:
isStartedin interfaceorg.apache.activemq.artemis.core.server.ActiveMQComponent
-
createDirs
-
flush
public void flush()- Specified by:
flushin interfaceorg.apache.activemq.artemis.core.io.SequentialFileFactory
-
destroy
- Throws:
SQLException
-