com.atlassian.bonnie.index
Class SingletonObjectQueue

java.lang.Object
  extended bycom.atlassian.bonnie.index.SingletonObjectQueue
All Implemented Interfaces:
ObjectQueue

public class SingletonObjectQueue
extends java.lang.Object
implements ObjectQueue

A queue for indexing a single object.


Nested Class Summary
 
Nested classes inherited from class com.atlassian.bonnie.index.ObjectQueue
ObjectQueue.Processor
 
Constructor Summary
SingletonObjectQueue(java.lang.Object o, ObjectToDocumentConverter otdc)
           
 
Method Summary
 ObjectQueue.Processor getProcessor()
          Get this queue's processor.
 boolean hasMore()
          Are there more objects in the queue?
 java.util.Collection pop()
          Pops a block of objects to index.
 int size()
          Size of queue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingletonObjectQueue

public SingletonObjectQueue(java.lang.Object o,
                            ObjectToDocumentConverter otdc)
Method Detail

pop

public java.util.Collection pop()
Description copied from interface: ObjectQueue
Pops a block of objects to index. Returns a collection of objects instead of a single object to minimize lock contention.

Specified by:
pop in interface ObjectQueue
Returns:
objects to index

hasMore

public boolean hasMore()
Description copied from interface: ObjectQueue
Are there more objects in the queue?

Specified by:
hasMore in interface ObjectQueue
Returns:

size

public int size()
Description copied from interface: ObjectQueue
Size of queue. For Iterator-backed implementations, the size is not known. Clients should only use this method to obtain an approximation of the actual number of objects to index.

Specified by:
size in interface ObjectQueue
Returns:

getProcessor

public ObjectQueue.Processor getProcessor()
Description copied from interface: ObjectQueue
Get this queue's processor. Implementations must either return a thread-safe processor or a thread-local instance of the processor.

Specified by:
getProcessor in interface ObjectQueue
Returns:


Copyright © 2006-2009 Atlassian Software Systems Pty Ltd. All Rights Reserved.