This project has retired. For details please refer to its Attic page.
Apache REEF: Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader Class Reference
Apache REEF  0.15.0
Retainable Evaluator Execution Framework
Public Member Functions | List of all members
Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader Class Reference

Class with functions to Read from stream More...

Inherits Org.Apache.REEF.Wake.Remote.IDataReader.

Public Member Functions

 StreamDataReader (Stream stream)
 Constructs the StreamDataReader More...
 
double ReadDouble ()
 Reads double More...
 
float ReadFloat ()
 Reads float More...
 
long ReadLong ()
 Reads long More...
 
bool ReadBoolean ()
 Reads bool More...
 
int ReadInt32 ()
 Reads integer More...
 
short ReadInt16 ()
 Reads short More...
 
string ReadString ()
 Reads string More...
 
int Read (ref byte[] buffer, int index, int bytesToRead)
 Reads data in to the buffer More...
 
async Task< double > ReadDoubleAsync (CancellationToken token)
 Reads double asynchronously More...
 
async Task< float > ReadFloatAsync (CancellationToken token)
 Reads float asynchronously More...
 
async Task< long > ReadLongAsync (CancellationToken token)
 Reads long asynchronously More...
 
async Task< bool > ReadBooleanAsync (CancellationToken token)
 Reads bool asynchronously More...
 
async Task< int > ReadInt32Async (CancellationToken token)
 Reads integer asynchronously More...
 
async Task< short > ReadInt16Async (CancellationToken token)
 Reads short asynchronously More...
 
async Task< string > ReadStringAsync (CancellationToken token)
 Reads string asynchronously More...
 
async Task< int > ReadAsync (byte[] buffer, int index, int bytesToRead, CancellationToken token)
 Reads data in to the buffer asynchronously More...
 

Detailed Description

Class with functions to Read from stream

Constructor & Destructor Documentation

Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader.StreamDataReader ( Stream  stream)
inline

Constructs the StreamDataReader

Parameters
streamStream from which to read

Member Function Documentation

int Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader.Read ( ref byte[]  buffer,
int  index,
int  bytesToRead 
)
inline

Reads data in to the buffer

Parameters
bufferbyte array to which to write
indexstarting index in the array
bytesToReadnumber of bytes to write
Returns
Task handler that reads bytes and returns that number of bytes read if success, otherwise -1

Implements Org.Apache.REEF.Wake.Remote.IDataReader.

async Task<int> Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader.ReadAsync ( byte[]  buffer,
int  index,
int  bytesToRead,
CancellationToken  token 
)
inline

Reads data in to the buffer asynchronously

Parameters
bufferbyte array to which to write
indexstarting index in the array
bytesToReadnumber of bytes to write
tokenCancellation token
Returns
Task handler that reads bytes and returns that number of bytes read if success, otherwise -1

Implements Org.Apache.REEF.Wake.Remote.IDataReader.

bool Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader.ReadBoolean ( )
inline

Reads bool

Returns
read bool

Implements Org.Apache.REEF.Wake.Remote.IDataReader.

async Task<bool> Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader.ReadBooleanAsync ( CancellationToken  token)
inline

Reads bool asynchronously

Parameters
tokenCancellation token
Returns
Task handler that reads bool

Implements Org.Apache.REEF.Wake.Remote.IDataReader.

double Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader.ReadDouble ( )
inline

Reads double

Returns
read double

Implements Org.Apache.REEF.Wake.Remote.IDataReader.

async Task<double> Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader.ReadDoubleAsync ( CancellationToken  token)
inline

Reads double asynchronously

Parameters
tokenCancellation token
Returns
Task handler that reads double

Implements Org.Apache.REEF.Wake.Remote.IDataReader.

float Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader.ReadFloat ( )
inline

Reads float

Returns
read float

Implements Org.Apache.REEF.Wake.Remote.IDataReader.

async Task<float> Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader.ReadFloatAsync ( CancellationToken  token)
inline

Reads float asynchronously

Parameters
tokenCancellation token
Returns
Task handler that reads float

Implements Org.Apache.REEF.Wake.Remote.IDataReader.

short Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader.ReadInt16 ( )
inline

Reads short

Returns
read short

Implements Org.Apache.REEF.Wake.Remote.IDataReader.

async Task<short> Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader.ReadInt16Async ( CancellationToken  token)
inline

Reads short asynchronously

Parameters
tokenCancellation token
Returns
Task handler that reads short

Implements Org.Apache.REEF.Wake.Remote.IDataReader.

int Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader.ReadInt32 ( )
inline

Reads integer

Returns
read integer

Implements Org.Apache.REEF.Wake.Remote.IDataReader.

async Task<int> Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader.ReadInt32Async ( CancellationToken  token)
inline

Reads integer asynchronously

Parameters
tokenCancellation token
Returns
Task handler that reads integer

Implements Org.Apache.REEF.Wake.Remote.IDataReader.

long Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader.ReadLong ( )
inline

Reads long

Returns
read long

Implements Org.Apache.REEF.Wake.Remote.IDataReader.

async Task<long> Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader.ReadLongAsync ( CancellationToken  token)
inline

Reads long asynchronously

Parameters
tokenCancellation token
Returns
Task handler that reads long

Implements Org.Apache.REEF.Wake.Remote.IDataReader.

string Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader.ReadString ( )
inline

Reads string

Returns
read string

Implements Org.Apache.REEF.Wake.Remote.IDataReader.

async Task<string> Org.Apache.REEF.Wake.Remote.Impl.StreamDataReader.ReadStringAsync ( CancellationToken  token)
inline

Reads string asynchronously

Parameters
tokenCancellation token
Returns
Task handler that reads string

Implements Org.Apache.REEF.Wake.Remote.IDataReader.


The documentation for this class was generated from the following file: