JThreadKitTM
v1.1.0
(public members only)

com.jthreadkit.fifo
Class MultiArrayObjectFIFO

java.lang.Object
  |
  +--com.jthreadkit.AbstractSizeMonitored
        |
        +--com.jthreadkit.fifo.AbstractFIFO
              |
              +--com.jthreadkit.fifo.AbstractObjectFIFO
                    |
                    +--com.jthreadkit.fifo.MultiArrayObjectFIFO
All Implemented Interfaces:
AccessibleLock, BasicFIFO, ObjectFIFO, SimpleShutdown, SizeMonitored, TimedOutExceptionOption

public class MultiArrayObjectFIFO
extends AbstractObjectFIFO
implements ObjectFIFO

MultiArrayObjectFIFO is an implementation of the ObjectFIFO interface that stores the items in a multiple Object[] internally. To allow for easy switching of implementations, you should generally use the interface type as the reference:
  
ObjectFIFO fifo = new MultiArrayObjectFIFO(100, 1000);


Constructor Summary
MultiArrayObjectFIFO()
           
MultiArrayObjectFIFO(int extentSize, int initialCapacity)
           
MultiArrayObjectFIFO(int extentSize, int initialCapacity, Class elementType, Object lock, boolean useTimedOutException)
           
 
Method Summary
 int getExtentSize()
          Returns the current extent size.
 int setExtentSize(int newExtentSize)
          Requests that the extent size be changed.
 String toString()
           
 
Methods inherited from class com.jthreadkit.fifo.AbstractObjectFIFO
add, add, addEach, addEach, addEach, addEach, getElementType, peek, peek, peek, peek, peek, peek, peekAll, peekAtLeastOne, peekAtLeastOne, remove, remove, remove, remove, remove, remove, removeAll, removeAtLeastOne, removeAtLeastOne, setCapacity, setElementType
 
Methods inherited from class com.jthreadkit.fifo.AbstractFIFO
skip, skip, skipExactly, skipExactly
 
Methods inherited from class com.jthreadkit.AbstractSizeMonitored
addSizeChangeListener, getCapacity, getLockObject, getSize, isEmpty, isFull, isUseTimedOutExceptionSet, removeSizeChangeListener, setUseTimedOutException, shutdown, shutdownWhenEmpty, waitForSizeToChange, waitForSizeToChange, waitForSizeToClimbTo, waitForSizeToClimbTo, waitForSizeToFallTo, waitForSizeToFallTo, waitUntilEmpty, waitUntilEmpty, waitUntilFull, waitUntilFull, waitUntilSizeInRange, waitUntilSizeInRange, waitUntilSizeIs, waitUntilSizeIs, waitWhileEmpty, waitWhileEmpty, waitWhileFull, waitWhileFull, waitWhileSizeInRange, waitWhileSizeInRange, waitWhileSizeIs, waitWhileSizeIs
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.jthreadkit.fifo.ObjectFIFO
add, add, addEach, addEach, addEach, addEach, getElementType, peek, peek, peek, peek, peek, peek, peekAll, peekAtLeastOne, peekAtLeastOne, remove, remove, remove, remove, remove, remove, removeAll, removeAtLeastOne, removeAtLeastOne, setElementType
 
Methods inherited from interface com.jthreadkit.fifo.BasicFIFO
skip, skip, skipExactly, skipExactly
 
Methods inherited from interface com.jthreadkit.SizeMonitored
addSizeChangeListener, getCapacity, getSize, isEmpty, isFull, removeSizeChangeListener, setCapacity, shutdownWhenEmpty, waitForSizeToChange, waitForSizeToChange, waitForSizeToClimbTo, waitForSizeToClimbTo, waitForSizeToFallTo, waitForSizeToFallTo, waitUntilEmpty, waitUntilEmpty, waitUntilFull, waitUntilFull, waitUntilSizeInRange, waitUntilSizeInRange, waitUntilSizeIs, waitUntilSizeIs, waitWhileEmpty, waitWhileEmpty, waitWhileFull, waitWhileFull, waitWhileSizeInRange, waitWhileSizeInRange, waitWhileSizeIs, waitWhileSizeIs
 
Methods inherited from interface com.jthreadkit.AccessibleLock
getLockObject
 
Methods inherited from interface com.jthreadkit.SimpleShutdown
shutdown
 
Methods inherited from interface com.jthreadkit.TimedOutExceptionOption
isUseTimedOutExceptionSet, setUseTimedOutException
 

Constructor Detail

MultiArrayObjectFIFO

public MultiArrayObjectFIFO(int extentSize,
                            int initialCapacity,
                            Class elementType,
                            Object lock,
                            boolean useTimedOutException)

MultiArrayObjectFIFO

public MultiArrayObjectFIFO(int extentSize,
                            int initialCapacity)

MultiArrayObjectFIFO

public MultiArrayObjectFIFO()
Method Detail

getExtentSize

public int getExtentSize()
Returns the current extent size. The items are stored in this FIFO by a singly-linked list of equal-sized extents. Extents are allocated and deallocated as necessary.

setExtentSize

public int setExtentSize(int newExtentSize)
Requests that the extent size be changed. The minimum extent size allowed is 10 and the requested value is silently increased if necessary--the resulting extent size is returned.

Note: This is an expensive operation (in terms of processing cost and garbage generation) and should be used sparingly.

Parameters:
newExtentSize - the requested new size for all extents.
Returns:
the resulting new extent size (might be greater than the request).

toString

public String toString()
Overrides:
toString in class Object

JThreadKitTM
v1.1.0
(public members only)

© Copyright 2000-2001 Programix Incorporated. All rights reserved. JThreadKit home