51Degrees Pipeline for Java

fiftyone.common.wrappers.data.ReaderPool Class Reference

Inheritance diagram for fiftyone.common.wrappers.data.ReaderPool:

[legend]

Collaboration diagram for fiftyone.common.wrappers.data.ReaderPool:

[legend]

Public Member Functions

 ReaderPool (Source source)
BinaryReader getReader () throws IOException
 Returns a reader to the temp file for exclusive use.
void release (BinaryReader reader)
 Returns the reader to the pool to be used by another process later.
int getReadersCreated ()
 The number of readers that have been created.
int getReadersQueued ()
 Returns The number of readers in the queue.
void close () throws IOException

Member Function Documentation

◆ getReader()

BinaryReader fiftyone.common.wrappers.data.ReaderPool.getReader ( ) throws IOException

Returns a reader to the temp file for exclusive use.

Release method must be called to return the reader to the pool when finished.

Returns
Reader open and ready to read from the temp file.
Exceptions
IOExceptionif there was a problem accessing data file.

◆ getReadersCreated()

int fiftyone.common.wrappers.data.ReaderPool.getReadersCreated ( )

The number of readers that have been created.

May not be the same as the readers in the queue as some may be in use.

Returns
The number of readers that have been created.

◆ getReadersQueued()

int fiftyone.common.wrappers.data.ReaderPool.getReadersQueued ( )

Returns The number of readers in the queue.

Returns
The number of readers in the queue.

◆ release()

void fiftyone.common.wrappers.data.ReaderPool.release ( BinaryReader reader)

Returns the reader to the pool to be used by another process later.

Parameters
readerReader open and ready to read from the temp file