FetchingSession (gCube Species Discovery 3.3.0-SNAPSHOT API)
Date: 2013-07-19

org.gcube.portlets.user.speciesdiscovery.server.session

## Class FetchingSession<T extends FetchingElement>

- java.lang.Object
- - org.gcube.portlets.user.speciesdiscovery.server.session.FetchingSession<T>

- All Implemented Interfaces:
    Closeable, AutoCloseable

      public class FetchingSession<T extends FetchingElement>
      extends Object
      implements Closeable

  Author:
    "Federico De Faveri defaveri@isti.cnr.it"

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected AggregatorIterator<T>` | `aggregatorIterator`
    `protected FetchingBuffer<T>` | `buffer`
    `protected Fetcher<T>` | `fetcher`
    `protected Thread` | `fetcherThread`
    `protected org.apache.log4j.Logger` | `logger`
    `protected CloseableIterator<T>` | `source`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FetchingSession(CloseableIterator<T> source, FetchingBuffer<T> buffer)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAggregator(Aggregator<T,?> aggregator)`
    `void` | `close()`
    `Aggregator<T,?>` | `getAggregator(String name)`
    `FetchingBuffer<T>` | `getBuffer()`
    `int` | `getBufferSize()`
    `boolean` | `isComplete()`
    `protected void` | `setupAggregatorIterator()`
    `void` | `startFetching()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### logger

          protected org.apache.log4j.Logger logger

    - #### buffer

          protected FetchingBuffer<T extends FetchingElement> buffer

    - #### fetcher

          protected Fetcher<T extends FetchingElement> fetcher

    - #### fetcherThread

          protected Thread fetcherThread

    - #### source

          protected CloseableIterator<T extends FetchingElement> source

    - #### aggregatorIterator

          protected AggregatorIterator<T extends FetchingElement> aggregatorIterator

  - ### Constructor Detail

    - #### FetchingSession

          public FetchingSession(CloseableIterator<T> source,
                         FetchingBuffer<T> buffer)

  - ### Method Detail

    - #### addAggregator

          public void addAggregator(Aggregator<T,?> aggregator)

    - #### setupAggregatorIterator

          protected void setupAggregatorIterator()

    - #### getAggregator

          public Aggregator<T,?> getAggregator(String name)

    - #### startFetching

          public void startFetching()

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `IOException`

    - #### isComplete

          public boolean isComplete()

    - #### getBuffer

          public FetchingBuffer<T> getBuffer()
                                                              throws Exception

      Throws:
        `Exception`

    - #### getBufferSize

          public int getBufferSize()
                            throws Exception

      Throws:
        `Exception`

Copyright © 2013. All Rights Reserved.