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

## com.hp.hpl.jena.graph.query
Class BufferPipe

    java.lang.Object
      com.hp.hpl.jena.graph.query.BufferPipe

All Implemented Interfaces:
  Pipe

    public class BufferPipe

extends java.lang.Object
implements Pipe

This class is a pipe between query threads, implemented as a bounded buffer.

Author:
  kers

Nested Class Summary
`static class` | `BufferPipe.BoundedBufferPutException` Exception to throw if a `put` throws an exception.
`static class` | `BufferPipe.BoundedBufferTakeException` Exception to throw if a `take` throws an exception.
`static class` | `BufferPipe.Finished`

Constructor Summary
`BufferPipe()`

Method Summary
`void` | `close()` Close the pipe. hasNext() will deliver `false`, and `get` will throw an exception.
`void` | `close(java.lang.Exception e)` Close the pipe (see close()) and record `e` as its termination status.
`Domain` | `get()` Answer the next element if there is one, otherwise throw a NoSuchElementException.
`boolean` | `hasNext()` Answer true iff there are more elements for `get()` to get.
`void` | `put(Domain d)` Put a domain element into the pipe for later extraction.

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

Constructor Detail

### BufferPipe

    public BufferPipe()

Method Detail

### put

    public void put(Domain d)

  Description copied from interface: `Pipe`
  Put a domain element into the pipe for later extraction.

  Specified by:
    `put` in interface `Pipe`

### close

    public void close()

  Description copied from interface: `Pipe`
  Close the pipe. hasNext() will deliver `false`, and `get` will throw an exception.

  Specified by:
    `close` in interface `Pipe`

### close

    public void close(java.lang.Exception e)

  Description copied from interface: `Pipe`
  Close the pipe (see close()) and record `e` as its termination status. Any `get` from the pipe must then fail, throwing an exception.

  Specified by:
    `close` in interface `Pipe`
  Parameters:
    `e` - the exception that caused the pipe to be closed

### hasNext

    public boolean hasNext()

  Description copied from interface: `Pipe`
  Answer true iff there are more elements for `get()` to get. If the pipe was closed with an exception, throw that exception.

  Specified by:
    `hasNext` in interface `Pipe`

### get

    public Domain get()

  Description copied from interface: `Pipe`
  Answer the next element if there is one, otherwise throw a NoSuchElementException.

  Specified by:
    `get` in interface `Pipe`

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

Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP