Class JDBCSequentialFile
- java.lang.Object
-
- org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFile
-
- All Implemented Interfaces:
org.apache.activemq.artemis.core.io.SequentialFile
public class JDBCSequentialFile extends java.lang.Object implements org.apache.activemq.artemis.core.io.SequentialFile
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMetaData(java.lang.Object key, java.lang.Object value)voidblockingWriteDirect(java.nio.ByteBuffer bytes, boolean sync, boolean releaseBuffer)intcalculateBlockStart(int position)org.apache.activemq.artemis.core.io.SequentialFilecloneFile()voidclose()voidclose(boolean waitOnSync, boolean block)voidcopyTo(org.apache.activemq.artemis.core.io.SequentialFile cloneFile)voiddelete()booleanexists()voidfill(int size)booleanfits(int size)java.lang.StringgetExtension()java.lang.StringgetFilename()java.lang.StringgetFileName()longgetId()java.io.FilegetJavaFile()java.lang.ObjectgetMetaData(java.lang.Object key)intinternalWrite(org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer, org.apache.activemq.artemis.core.io.IOCallback callback)intinternalWrite(org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer, org.apache.activemq.artemis.core.io.IOCallback callback, boolean append)booleanisOpen()java.nio.ByteBuffermap(int position, long size)voidopen()voidopen(int maxIO, boolean useExecutor)longposition()voidposition(long pos)intread(java.nio.ByteBuffer bytes)intread(java.nio.ByteBuffer bytes, org.apache.activemq.artemis.core.io.IOCallback callback)voidrenameTo(java.lang.String newFileName)voidsetId(long id)voidsetTimedBuffer(org.apache.activemq.artemis.core.io.buffer.TimedBuffer buffer)longsize()voidsync()voidwrite(org.apache.activemq.artemis.api.core.ActiveMQBuffer bytes, boolean sync)voidwrite(org.apache.activemq.artemis.api.core.ActiveMQBuffer bytes, boolean sync, org.apache.activemq.artemis.core.io.IOCallback callback)voidwrite(org.apache.activemq.artemis.api.core.ActiveMQBuffer bytes, boolean sync, org.apache.activemq.artemis.core.io.IOCallback callback, boolean append)voidwrite(org.apache.activemq.artemis.core.journal.EncodingSupport bytes, boolean sync)voidwrite(org.apache.activemq.artemis.core.journal.EncodingSupport bytes, boolean sync, org.apache.activemq.artemis.core.io.IOCallback callback)voidwriteDirect(java.nio.ByteBuffer bytes, boolean sync)voidwriteDirect(java.nio.ByteBuffer bytes, boolean sync, org.apache.activemq.artemis.core.io.IOCallback callback)
-
-
-
Method Detail
-
isOpen
public boolean isOpen()
- Specified by:
isOpenin interfaceorg.apache.activemq.artemis.core.io.SequentialFile
-
exists
public boolean exists()
- Specified by:
existsin interfaceorg.apache.activemq.artemis.core.io.SequentialFile
-
open
public void open() throws java.lang.Exception- Specified by:
openin interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.lang.Exception
-
open
public void open(int maxIO, boolean useExecutor) throws java.lang.Exception- Specified by:
openin interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.lang.Exception
-
fits
public boolean fits(int size)
- Specified by:
fitsin interfaceorg.apache.activemq.artemis.core.io.SequentialFile
-
calculateBlockStart
public int calculateBlockStart(int position) throws java.lang.Exception- Specified by:
calculateBlockStartin interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.lang.Exception
-
getFileName
public java.lang.String getFileName()
- Specified by:
getFileNamein interfaceorg.apache.activemq.artemis.core.io.SequentialFile
-
fill
public void fill(int size) throws java.lang.Exception- Specified by:
fillin interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.lang.Exception
-
map
public java.nio.ByteBuffer map(int position, long size) throws java.io.IOException- Specified by:
mapin interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.io.IOException
-
delete
public void delete() throws java.io.IOException, java.lang.InterruptedException, org.apache.activemq.artemis.api.core.ActiveMQException- Specified by:
deletein interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.io.IOExceptionjava.lang.InterruptedExceptionorg.apache.activemq.artemis.api.core.ActiveMQException
-
internalWrite
public int internalWrite(org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer, org.apache.activemq.artemis.core.io.IOCallback callback)
-
internalWrite
public int internalWrite(org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer, org.apache.activemq.artemis.core.io.IOCallback callback, boolean append)
-
write
public void write(org.apache.activemq.artemis.api.core.ActiveMQBuffer bytes, boolean sync, org.apache.activemq.artemis.core.io.IOCallback callback, boolean append) throws java.lang.Exception- Throws:
java.lang.Exception
-
write
public void write(org.apache.activemq.artemis.api.core.ActiveMQBuffer bytes, boolean sync, org.apache.activemq.artemis.core.io.IOCallback callback) throws java.lang.Exception- Specified by:
writein interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.lang.Exception
-
write
public void write(org.apache.activemq.artemis.api.core.ActiveMQBuffer bytes, boolean sync) throws java.lang.Exception- Specified by:
writein interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.lang.Exception
-
write
public void write(org.apache.activemq.artemis.core.journal.EncodingSupport bytes, boolean sync, org.apache.activemq.artemis.core.io.IOCallback callback) throws java.lang.Exception- Specified by:
writein interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.lang.Exception
-
write
public void write(org.apache.activemq.artemis.core.journal.EncodingSupport bytes, boolean sync) throws java.lang.Exception- Specified by:
writein interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.lang.Exception
-
writeDirect
public void writeDirect(java.nio.ByteBuffer bytes, boolean sync, org.apache.activemq.artemis.core.io.IOCallback callback)- Specified by:
writeDirectin interfaceorg.apache.activemq.artemis.core.io.SequentialFile
-
blockingWriteDirect
public void blockingWriteDirect(java.nio.ByteBuffer bytes, boolean sync, boolean releaseBuffer)- Specified by:
blockingWriteDirectin interfaceorg.apache.activemq.artemis.core.io.SequentialFile
-
writeDirect
public void writeDirect(java.nio.ByteBuffer bytes, boolean sync) throws java.lang.Exception- Specified by:
writeDirectin interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.lang.Exception
-
read
public int read(java.nio.ByteBuffer bytes, org.apache.activemq.artemis.core.io.IOCallback callback) throws java.sql.SQLException- Specified by:
readin interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.sql.SQLException
-
read
public int read(java.nio.ByteBuffer bytes) throws java.lang.Exception- Specified by:
readin interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.lang.Exception
-
position
public void position(long pos) throws java.io.IOException- Specified by:
positionin interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.io.IOException
-
position
public long position()
- Specified by:
positionin interfaceorg.apache.activemq.artemis.core.io.SequentialFile
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.lang.Exception
-
close
public void close(boolean waitOnSync, boolean block) throws java.lang.Exception- Specified by:
closein interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.lang.Exception
-
sync
public void sync() throws java.io.IOException- Specified by:
syncin interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.io.IOException
-
size
public long size() throws java.lang.Exception- Specified by:
sizein interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.lang.Exception
-
renameTo
public void renameTo(java.lang.String newFileName) throws java.lang.Exception- Specified by:
renameToin interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.lang.Exception
-
cloneFile
public org.apache.activemq.artemis.core.io.SequentialFile cloneFile()
- Specified by:
cloneFilein interfaceorg.apache.activemq.artemis.core.io.SequentialFile
-
copyTo
public void copyTo(org.apache.activemq.artemis.core.io.SequentialFile cloneFile) throws java.lang.Exception- Specified by:
copyToin interfaceorg.apache.activemq.artemis.core.io.SequentialFile- Throws:
java.lang.Exception
-
getId
public long getId()
-
setId
public void setId(long id)
-
getFilename
public java.lang.String getFilename()
-
getExtension
public java.lang.String getExtension()
-
setTimedBuffer
public void setTimedBuffer(org.apache.activemq.artemis.core.io.buffer.TimedBuffer buffer)
- Specified by:
setTimedBufferin interfaceorg.apache.activemq.artemis.core.io.SequentialFile
-
getJavaFile
public java.io.File getJavaFile()
- Specified by:
getJavaFilein interfaceorg.apache.activemq.artemis.core.io.SequentialFile
-
addMetaData
public void addMetaData(java.lang.Object key, java.lang.Object value)
-
getMetaData
public java.lang.Object getMetaData(java.lang.Object key)
-
-