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

Represents an open connection between remote hosts More...

Inherits Org.Apache.REEF.Wake.Remote.ILink< T >.

Public Member Functions

 Link (IPEndPoint remoteEndpoint, ICodec< T > codec, ITcpClientConnectionFactory tcpClientFactory)
 Constructs a Link object. More...
 
 Link (TcpClient client, ICodec< T > codec)
 Constructs a Link object. More...
 
void Write (T value)
 Writes the message to the remote host More...
 
async Task WriteAsync (T value, CancellationToken token)
 Writes the value to this link asynchronously More...
 
Read ()
 Reads the value from the link synchronously More...
 
async Task< T > ReadAsync (CancellationToken token)
 Reads the value from the link asynchronously More...
 
void Dispose ()
 Close the client connection More...
 
virtual void Dispose (bool disposing)
 Subclasses of Links should overwrite this to handle disposing of the link More...
 
override bool Equals (object obj)
 Overrides Equals. More...
 
override int GetHashCode ()
 Gets the hash code for the Link object. More...
 

Properties

IPEndPoint LocalEndpoint [get]
 Returns the local socket address More...
 
IPEndPoint RemoteEndpoint [get]
 Returns the remote socket address More...
 
TcpClient Client [get]
 Gets the underlying TcpClient More...
 

Detailed Description

Represents an open connection between remote hosts

Constructor & Destructor Documentation

Org.Apache.REEF.Wake.Remote.Impl.Link< T >.Link ( IPEndPoint  remoteEndpoint,
ICodec< T >  codec,
ITcpClientConnectionFactory  tcpClientFactory 
)
inline

Constructs a Link object.

Connects to the specified remote endpoint.

Parameters
remoteEndpointThe remote endpoint to connect to
codecThe codec for serializing messages
tcpClientFactoryTcpClient factory
Org.Apache.REEF.Wake.Remote.Impl.Link< T >.Link ( TcpClient  client,
ICodec< T >  codec 
)
inline

Constructs a Link object.

Uses the already connected TcpClient.

Parameters
clientThe already connected client
codecThe encoder and decoder

Member Function Documentation

void Org.Apache.REEF.Wake.Remote.Impl.Link< T >.Dispose ( )
inline

Close the client connection

virtual void Org.Apache.REEF.Wake.Remote.Impl.Link< T >.Dispose ( bool  disposing)
inlinevirtual

Subclasses of Links should overwrite this to handle disposing of the link

Parameters
disposingTo dispose or not
override bool Org.Apache.REEF.Wake.Remote.Impl.Link< T >.Equals ( object  obj)
inline

Overrides Equals.

Two Link objects are equal if they are connected to the same remote endpoint.

Parameters
objThe object to compare
Returns
True if the object is equal to this Link, otherwise false
override int Org.Apache.REEF.Wake.Remote.Impl.Link< T >.GetHashCode ( )
inline

Gets the hash code for the Link object.

Returns
The object's hash code
T Org.Apache.REEF.Wake.Remote.Impl.Link< T >.Read ( )
inline

Reads the value from the link synchronously

Implements Org.Apache.REEF.Wake.Remote.ILink< T >.

async Task<T> Org.Apache.REEF.Wake.Remote.Impl.Link< T >.ReadAsync ( CancellationToken  token)
inline

Reads the value from the link asynchronously

Parameters
tokenThe cancellation token

Implements Org.Apache.REEF.Wake.Remote.ILink< T >.

void Org.Apache.REEF.Wake.Remote.Impl.Link< T >.Write ( value)
inline

Writes the message to the remote host

Parameters
valueThe data to write

Implements Org.Apache.REEF.Wake.Remote.ILink< T >.

async Task Org.Apache.REEF.Wake.Remote.Impl.Link< T >.WriteAsync ( value,
CancellationToken  token 
)
inline

Writes the value to this link asynchronously

Parameters
valueThe data to write
tokenThe cancellation token

Implements Org.Apache.REEF.Wake.Remote.ILink< T >.

Property Documentation

TcpClient Org.Apache.REEF.Wake.Remote.Impl.Link< T >.Client
get

Gets the underlying TcpClient

IPEndPoint Org.Apache.REEF.Wake.Remote.Impl.Link< T >.LocalEndpoint
get

Returns the local socket address

IPEndPoint Org.Apache.REEF.Wake.Remote.Impl.Link< T >.RemoteEndpoint
get

Returns the remote socket address


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