org.jboss.messaging.core.asyncio.impl
Class TimedBuffer

java.lang.Object
  extended by org.jboss.messaging.core.asyncio.impl.TimedBuffer

public class TimedBuffer
extends java.lang.Object

A TimedBuffer

Author:
Clebert Suconic, Tim Fox

Constructor Summary
TimedBuffer(int size, long timeout, boolean flushOnSync, boolean logRates)
           
 
Method Summary
 void addBytes(byte[] bytes, boolean sync, AIOCallback callback)
           
 boolean checkSize(int sizeChecked)
          Verify if the size fits the buffer
 void flush()
           
 void lock()
           
 void setObserver(TimedBufferObserver observer)
           
 void start()
           
 void stop()
           
 void unlock()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimedBuffer

public TimedBuffer(int size,
                   long timeout,
                   boolean flushOnSync,
                   boolean logRates)
Method Detail

start

public void start()

stop

public void stop()

setObserver

public void setObserver(TimedBufferObserver observer)

lock

public void lock()

unlock

public void unlock()

checkSize

public boolean checkSize(int sizeChecked)
Verify if the size fits the buffer

Parameters:
sizeChecked -
Returns:

addBytes

public void addBytes(byte[] bytes,
                     boolean sync,
                     AIOCallback callback)

flush

public void flush()


Copyright © 2006 JBoss Inc. All Rights Reserved.