Class Transport
Transports are thread-safe and are intended for use by multiple threads from ClientCallReactor and ServerProcessor when bindings operate in OperationFlow.Asynchronous mode. Transports are acquired by the thread that creates them
Inheritance
Implements
Inherited Members
Namespace: Azos.Glue
Assembly: Azos.dll
Syntax
public abstract class Transport : Daemon<Binding>, IDisposable, IDaemon, IDaemonView, IApplicationComponent, INamed, IConfigurable, ILocalizedTimeProvider
Constructors
Transport(Binding, TransportKind)
Declaration
protected Transport(Binding binding, TransportKind kind)
Parameters
Type | Name | Description |
---|---|---|
Binding | binding | |
TransportKind | kind |
Fields
m_TransportKind
Declaration
protected TransportKind m_TransportKind
Field Value
Type | Description |
---|---|
TransportKind |
Properties
Acquired
Returns true when this transport instance has been acquired by some operation and is busy
Declaration
public bool Acquired { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Binding
Returns a binding that this transport operates under
Declaration
public Binding Binding { get; }
Property Value
Type | Description |
---|---|
Binding |
ComponentLogTopic
Declaration
public override string ComponentLogTopic { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
ExpirationStart
Returns timestamp when manager touched the instance for last time and no traffic went through it since
Declaration
public DateTime? ExpirationStart { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.DateTime> |
Glue
Returns glue implementation that this transport is under
Declaration
public IGlueImplementation Glue { get; }
Property Value
Type | Description |
---|---|
IGlueImplementation |
IdleAgeMs
Returns the duration of transport idle period in ms.
Declaration
public int IdleAgeMs { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Node
Returns node that this transport services
Declaration
public Node Node { get; protected set; }
Property Value
Type | Description |
---|---|
Node |
StatBytesReceived
Returns how many bytes were received since .ctor or last ResetStats() call
Declaration
public long StatBytesReceived { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
StatBytesSent
Returns how many bytes were sent since .ctor or last ResetStats() call
Declaration
public long StatBytesSent { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
StatErrors
Returns how many message processing errors happened since .ctor or last ResetStats() call
Declaration
public long StatErrors { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
StatMsgReceived
Returns how many messages were received since .ctor or last ResetStats() call
Declaration
public long StatMsgReceived { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
StatMsgSent
Returns how many messages were sent since .ctor or last ResetStats() call
Declaration
public long StatMsgSent { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
StatTimes
Returns enumerable of named times measured in double second fractions. The returned times are EMA-filtered from supplied individual measurement samples
Declaration
public IEnumerable<KeyValuePair<string, double>> StatTimes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Double>> |
TransportKind
Reports if this is a server or client transport
Declaration
public TransportKind TransportKind { get; }
Property Value
Type | Description |
---|---|
TransportKind |
Methods
CheckRunningState()
Ensures that application and transport instance are running or throws otherwise
Declaration
public void CheckRunningState()
Destructor()
Declaration
protected override void Destructor()
Overrides
DoDumpInstrumentationData()
Override to dump instrumentation data, dont forget to call base to dump basic metrics
Declaration
protected virtual void DoDumpInstrumentationData()
DoStart()
Declaration
protected override void DoStart()
Overrides
DumpInstrumentationData()
Dumps instrumentation data
Declaration
public void DumpInstrumentationData()
Release()
Releases transport by setting Acquired flag to false so it can be used by other operations
Declaration
public void Release()
ResetStats()
Resets all statistical counters
Declaration
public void ResetStats()
stat_BytesReceived(Int64)
Declaration
protected void stat_BytesReceived(long val)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | val |
stat_BytesSent(Int64)
Declaration
protected void stat_BytesSent(long val)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | val |
stat_Errors()
Declaration
protected void stat_Errors()
stat_MsgReceived(Int64)
Declaration
protected void stat_MsgReceived(long count = 1L)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | count |
stat_MsgSent()
Declaration
protected void stat_MsgSent()
stat_Time(String, Int64)
Processes named time measurement statistical sample by using EMA filter
Declaration
protected void stat_Time(string key, long ticks)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Name of time measurement key |
System.Int64 | ticks | Duration in ticks |
TryAcquire()
A thread-safe operation that tries to acquire(reserve) this instance for exclusive use. Returns true if acqusition succeded, false is this instance is reserved by someone else
Declaration
public bool TryAcquire()
Returns
Type | Description |
---|---|
System.Boolean |