joeq.Allocator
Interface AddressQueue

All Known Implementing Classes:
CircularAddressQueue

public interface AddressQueue

AddressQueue

Version:
$Id: AddressQueue.java,v 1.1 2004/08/05 18:33:30 joewhaley Exp $
Author:
John Whaley

Method Summary
 void free()
          Free the memory associated with this reference queue.
 void growQueue(int words)
          Grows the queue to the specified size in words.
 Address peek()
          Returns the first address from this queue, or null if the queue is empty.
 Address pull()
          Returns and removes an address from this queue, or returns null if the queue is empty.
 void push(Address a)
          Add the given address to the reference queue.
 int size()
          Return the number of elements in this queue.
 int space()
          Return the amount of free space (in words) in this queue.
 

Method Detail

free

void free()
Free the memory associated with this reference queue.


growQueue

void growQueue(int words)
Grows the queue to the specified size in words.

Parameters:
words -

size

int size()
Return the number of elements in this queue.

Returns:
number of elements in this queue

space

int space()
Return the amount of free space (in words) in this queue.

Returns:
amount of free space (in words) in this queue

push

void push(Address a)
Add the given address to the reference queue.

Parameters:
a - address to add

pull

Address pull()
Returns and removes an address from this queue, or returns null if the queue is empty.

Returns:
address, or null if queue is empty

peek

Address peek()
Returns the first address from this queue, or null if the queue is empty.

Returns:
address, or null if queue is empty


Copyright © 2001-2005 John Whaley. All Rights Reserved.