|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jmythapi.impl.AData<E> org.jmythapi.protocol.response.impl.AMythResponse<IRingBuffer.Props> org.jmythapi.protocol.response.impl.RingBuffer
public class RingBuffer
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.jmythapi.protocol.response.IRingBuffer |
---|
IRingBuffer.Props |
Nested classes/interfaces inherited from interface org.jmythapi.protocol.response.ITransferable |
---|
ITransferable.Seek |
Field Summary |
---|
Fields inherited from class org.jmythapi.impl.AData |
---|
logger, propsClass, protoVersion, respArgs |
Constructor Summary | |
---|---|
RingBuffer(IBackendConnection commandConnection,
int recorderId,
IMythPacket packet)
Deprecated. |
Method Summary | |
---|---|
Object |
clone()
Deprecated. Creates a copy of this object. |
void |
close()
Deprecated. Closes the ringbuffer connection. |
boolean |
done()
Deprecated. 20 |
long |
getAmount()
Deprecated. |
long |
getFreeSpace(long totalReadPos)
Deprecated. 20 |
long |
getSize()
Deprecated. |
String |
getUrl()
Deprecated. |
boolean |
isOpen()
Deprecated. Queries whether the ring buffer connection is open. |
int |
readBlock(byte[] buffer,
int requestedSize)
Deprecated. 20 |
long |
seek(long currentPosition,
long newPosition,
ITransferable.Seek whence)
Deprecated. 20 |
void |
setDataConnectin(IBackendConnection dataConnection)
Deprecated. |
Methods inherited from class org.jmythapi.protocol.response.impl.AMythResponse |
---|
checkSize, decodeProperty, encodeProperty, getExpectedSize, getPacket, getProperties, getProperty, getPropertyIndex |
Methods inherited from class org.jmythapi.impl.AData |
---|
equals, getPropertyClass, getPropertyCount, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValueObject, getPropertyValues, getVersionNr, hashCode, init, postProcessArguments, setPropertyValue, setPropertyValue, setPropertyValueObject, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jmythapi.IVersionable |
---|
getVersionNr |
Methods inherited from interface org.jmythapi.IPropertyAware |
---|
getProperties, getProperty, getPropertyClass, getPropertyCount, getPropertyIndex, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValues, setPropertyValue, setPropertyValue, setPropertyValueObject |
Constructor Detail |
---|
public RingBuffer(IBackendConnection commandConnection, int recorderId, IMythPacket packet)
Method Detail |
---|
public void setDataConnectin(IBackendConnection dataConnection)
public String getUrl()
getUrl
in interface IRingBuffer
public long getSize()
getSize
in interface IRingBuffer
public long getAmount()
getAmount
in interface IRingBuffer
public Object clone() throws CloneNotSupportedException
AData
clone
in class AData<IRingBuffer.Props>
CloneNotSupportedException
public boolean done() throws IOException
IRingBuffer
done
in interface IRingBuffer
done
in interface ITransferable<IRingBuffer.Props>
true
if the recorder respond with OK
.
IOException
- on communication errorspublic long seek(long currentPosition, long newPosition, ITransferable.Seek whence) throws IOException
IRingBuffer
seek
in interface IRingBuffer
seek
in interface ITransferable<IRingBuffer.Props>
currentPosition
- the current positionnewPosition
- the new positionwhence
- the seek mode
IOException
- on communication errorsQUERY_RECORDER_SEEK_RINGBUF
public int readBlock(byte[] buffer, int requestedSize) throws IOException
IRingBuffer
readBlock
in interface IRingBuffer
readBlock
in interface ITransferable<IRingBuffer.Props>
buffer
- the byte array that should be filled with datarequestedSize
- the amount of bytes to read.
IOException
- on communication errorsQUERY_RECORDER_REQUEST_BLOCK_RINGBUF
public long getFreeSpace(long totalReadPos) throws IOException
IRingBuffer
This function returns the number of bytes beyond "totalreadpos" it is safe to read.
getFreeSpace
in interface IRingBuffer
totalReadPos
- amount of already read bytes
-1
if "totalReadPos" is past the "safe read" position
of the file.
IOException
QUERY_RECORDER_GET_FREE_SPACE
public boolean isOpen() throws IOException
IRingBuffer
isOpen
in interface IRingBuffer
isOpen
in interface ITransferable<IRingBuffer.Props>
true
if the socket is open.
IOException
- on communication errorspublic void close() throws IOException
IRingBuffer
close
in interface Closeable
close
in interface IRingBuffer
close
in interface ITransferable<IRingBuffer.Props>
IOException
- on communication errors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |