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