org.jmythapi.protocol.response.impl
Class RingBuffer

java.lang.Object
  extended by org.jmythapi.impl.AData<E>
      extended by org.jmythapi.protocol.response.impl.AMythResponse<IRingBuffer.Props>
          extended by org.jmythapi.protocol.response.impl.RingBuffer
All Implemented Interfaces:
Closeable, Cloneable, IPropertyAware<IRingBuffer.Props>, IVersionable, ISendable, IMythResponse<IRingBuffer.Props>, IRingBuffer, ITransferable<IRingBuffer.Props>

Deprecated. 20

public class RingBuffer
extends AMythResponse<IRingBuffer.Props>
implements IRingBuffer, Closeable


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

RingBuffer

public RingBuffer(IBackendConnection commandConnection,
                  int recorderId,
                  IMythPacket packet)
Deprecated. 
Method Detail

setDataConnectin

public void setDataConnectin(IBackendConnection dataConnection)
Deprecated. 

getUrl

public String getUrl()
Deprecated. 
Specified by:
getUrl in interface IRingBuffer

getSize

public long getSize()
Deprecated. 
Specified by:
getSize in interface IRingBuffer

getAmount

public long getAmount()
Deprecated. 
Specified by:
getAmount in interface IRingBuffer

clone

public Object clone()
             throws CloneNotSupportedException
Deprecated. 
Description copied from class: AData
Creates a copy of this object.

Overrides:
clone in class AData<IRingBuffer.Props>
Returns:
a copy of this object
Throws:
CloneNotSupportedException

done

public boolean done()
             throws IOException
Deprecated. 20

Description copied from interface: IRingBuffer
Tells the recorder to free the ring buffer.

Specified by:
done in interface IRingBuffer
Specified by:
done in interface ITransferable<IRingBuffer.Props>
Returns:
true if the recorder respond with OK.
Throws:
IOException - on communication errors

seek

public long seek(long currentPosition,
                 long newPosition,
                 ITransferable.Seek whence)
          throws IOException
Deprecated. 20

Description copied from interface: IRingBuffer
Seeks to the given position in the ring buffer.

Specified by:
seek in interface IRingBuffer
Specified by:
seek in interface ITransferable<IRingBuffer.Props>
Parameters:
currentPosition - the current position
newPosition - the new position
whence - the seek mode
Throws:
IOException - on communication errors
See Also:
QUERY_RECORDER_SEEK_RINGBUF

readBlock

public int readBlock(byte[] buffer,
                     int requestedSize)
              throws IOException
Deprecated. 20

Description copied from interface: IRingBuffer
Requests a block from the ring-buffer.

Specified by:
readBlock in interface IRingBuffer
Specified by:
readBlock in interface ITransferable<IRingBuffer.Props>
Parameters:
buffer - the byte array that should be filled with data
requestedSize - the amount of bytes to read.
Throws:
IOException - on communication errors
See Also:
QUERY_RECORDER_REQUEST_BLOCK_RINGBUF

getFreeSpace

public long getFreeSpace(long totalReadPos)
                  throws IOException
Deprecated. 20

Description copied from interface: IRingBuffer
Queries bytes available to read.

This function returns the number of bytes beyond "totalreadpos" it is safe to read.

Specified by:
getFreeSpace in interface IRingBuffer
Parameters:
totalReadPos - amount of already read bytes
Returns:
the number of bytes beyond "totalReadPos" it is save to read or -1 if "totalReadPos" is past the "safe read" position of the file.
Throws:
IOException
See Also:
QUERY_RECORDER_GET_FREE_SPACE

isOpen

public boolean isOpen()
               throws IOException
Deprecated. 
Description copied from interface: IRingBuffer
Queries whether the ring buffer connection is open.

Specified by:
isOpen in interface IRingBuffer
Specified by:
isOpen in interface ITransferable<IRingBuffer.Props>
Returns:
true if the socket is open.
Throws:
IOException - on communication errors

close

public void close()
           throws IOException
Deprecated. 
Description copied from interface: IRingBuffer
Closes the ringbuffer connection.

Specified by:
close in interface Closeable
Specified by:
close in interface IRingBuffer
Specified by:
close in interface ITransferable<IRingBuffer.Props>
Throws:
IOException - on communication errors


Copyright © 2008-2013. All Rights Reserved.