FastQueue (Tomcat API Documentation)
Keywords: org.apache.catalina.tribes.transport.bio.util.FastQueue class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.catalina.tribes.transport.bio.util
Class FastQueue

    java.lang.Object
      org.apache.catalina.tribes.transport.bio.util.FastQueue

    public class FastQueue

extends java.lang.Object

A fast queue that remover thread lock the adder thread.
Limit the queue length when you have strange producer thread problemes. FIXME add i18n support to log messages

Version:
  $Revision: 500684 $ $Date: 2007-01-28 00:27:18 +0100 (Sun, 28 Jan 2007) $
Author:
  Rainer Jung, Peter Rossbach

Constructor Summary
`FastQueue()` Generate Queue SingleRemoveSynchronizedAddLock and set add and wait Timeouts

Method Summary
`boolean` | `add(ChannelMessage msg, Member[] destination, InterceptorPayload payload)` Add new data to the queue
`long` | `getAddWaitTimeout()` get current add wait timeout
`SingleRemoveSynchronizedAddLock` | `getLock()`
`int` | `getMaxQueueLength()` get Max Queue length
`int` | `getMaxSize()`
`long` | `getRemoveWaitTimeout()` get current remove wait timeout
`int` | `getSize()`
`boolean` | `isCheckLock()`
`boolean` | `isEnabled()`
`LinkObject` | `remove()` remove the complete queued object list
`void` | `setAddWaitTimeout(long timeout)` Set add wait timeout (default 10000 msec)
`void` | `setCheckLock(boolean checkLock)`
`void` | `setEnabled(boolean enable)`
`void` | `setMaxQueueLength(int length)`
`void` | `setMaxSize(int size)`
`void` | `setRemoveWaitTimeout(long timeout)` set remove wait timeout ( default 30000 msec)
`void` | `start()` start queuing
`void` | `stop()` start queuing
`void` | `unlockAdd()` unlock queue for next add
`void` | `unlockRemove()` unlock queue for next remove

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FastQueue

    public FastQueue()

  Generate Queue SingleRemoveSynchronizedAddLock and set add and wait Timeouts

Method Detail

### getAddWaitTimeout

    public long getAddWaitTimeout()

  get current add wait timeout

  Returns:
    current wait timeout

### setAddWaitTimeout

    public void setAddWaitTimeout(long timeout)

  Set add wait timeout (default 10000 msec)

  Parameters:
    `timeout` -

### getRemoveWaitTimeout

    public long getRemoveWaitTimeout()

  get current remove wait timeout

  Returns:
    The timeout

### setRemoveWaitTimeout

    public void setRemoveWaitTimeout(long timeout)

  set remove wait timeout ( default 30000 msec)

  Parameters:
    `timeout` -

### getMaxQueueLength

    public int getMaxQueueLength()

  get Max Queue length

  See Also:
    `org.apache.catalina.tribes.util.IQueue#getMaxQueueLength()`

### setMaxQueueLength

    public void setMaxQueueLength(int length)

### isEnabled

    public boolean isEnabled()

### setEnabled

    public void setEnabled(boolean enable)

### isCheckLock

    public boolean isCheckLock()

  Returns:
    Returns the checkLock.

### setCheckLock

    public void setCheckLock(boolean checkLock)

  Parameters:
    `checkLock` - The checkLock to set.

### getMaxSize

    public int getMaxSize()

  Returns:
    The max size

### setMaxSize

    public void setMaxSize(int size)

  Parameters:
    `size` -

### unlockAdd

    public void unlockAdd()

  unlock queue for next add

### unlockRemove

    public void unlockRemove()

  unlock queue for next remove

### start

    public void start()

  start queuing

### stop

    public void stop()

  start queuing

### getSize

    public int getSize()

### getLock

    public SingleRemoveSynchronizedAddLock getLock()

### add

    public boolean add(ChannelMessage msg,
                       Member[] destination,
                       InterceptorPayload payload)

  Add new data to the queue

  See Also:
    `FIXME extract some method`

### remove

    public LinkObject remove()

  remove the complete queued object list

  See Also:
    `FIXME extract some method`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.