Photon Server API
Public Member Functions | List of all members
ExitGames.Concurrency.Channels.ISubscriber< T > Interface Template Reference

Channel subscription methods. More...

Inheritance diagram for ExitGames.Concurrency.Channels.ISubscriber< T >:
ExitGames.Concurrency.Channels.IChannel< T > " alt="ExitGames.Concurrency.Channels.Channel< T >" shape="rect" coords="178,112,524,136"/> ExitGames.Messaging.Channels.Channel< T > ExitGames.Messaging.Channels.IChannel< T > ExitGames.Messaging.Channels.TopicPublishChannel< T > ExitGames.Messaging.Channels.Channel< T > Photon.SocketServer.Concurrency.MessageChannel< T > ExitGames.Messaging.Channels.TopicChannel< T >

Public Member Functions

IDisposable Subscribe (IFiber fiber, Action< T > receive)
 Subscribe to messages on this channel. The provided action will be invoked via a Action on the provided executor. /summary> param name="fiber">the target executor to receive the messageparam name="receive">returns>Unsubscriber object More...
 
IDisposable SubscribeToBatch (IFiber fiber, Action< IList< T >> receive, int intervalInMs)
 Subscribes to actions on the channel in batch form. The events will be batched if the consumer is unable to process the events faster than the arrival rate. More...
 
IDisposable SubscribeToKeyedBatch< K > (IFiber fiber, Converter< T, K > keyResolver, Action< IDictionary< K, T >> receive, int intervalInMs)
 
IDisposable SubscribeToLast (IFiber fiber, Action< T > receive, int intervalInMs)
 Subscription that delivers the latest message to the consuming thread. If a newer message arrives before the consuming thread has a chance to process the message, the pending message is replaced by the newer message. The old message is discarded. More...
 
void ClearSubscribers ()
 Removes all subscribers. More...
 

Detailed Description

Channel subscription methods.

Template Parameters
T

Member Function Documentation

void ExitGames.Concurrency.Channels.ISubscriber< T >.ClearSubscribers ( )
IDisposable ExitGames.Concurrency.Channels.ISubscriber< T >.Subscribe ( IFiber  fiber,
Action< T >  receive 
)

Subscribe to messages on this channel. The provided action will be invoked via a Action on the provided executor. /summary> param name="fiber">the target executor to receive the messageparam name="receive">returns>Unsubscriber object

Implemented in ExitGames.Messaging.Channels.TopicPublishChannel< T >, and ExitGames.Concurrency.Channels.Channel< T >.

IDisposable ExitGames.Concurrency.Channels.ISubscriber< T >.SubscribeToBatch ( IFiber  fiber,
Action< IList< T >>  receive,
int  intervalInMs 
)

Subscribes to actions on the channel in batch form. The events will be batched if the consumer is unable to process the events faster than the arrival rate.

Parameters
fiberThe target context to execute the action
receive
intervalInMsTime in Ms to batch actions. If 0 events will be delivered as fast as consumer can process
Returns

summary> Batches actions based upon keyed values allowing for duplicates to be dropped. /summary> param name="fiber">

param name="keyResolver">

param name="receive">

param name="intervalInMs">

typeparam name="K">

returns>

Implemented in ExitGames.Messaging.Channels.TopicPublishChannel< T >, and ExitGames.Concurrency.Channels.Channel< T >.

IDisposable ExitGames.Concurrency.Channels.ISubscriber< T >.SubscribeToKeyedBatch< K > ( IFiber  fiber,
Converter< T, K >  keyResolver,
Action< IDictionary< K, T >>  receive,
int  intervalInMs 
)
IDisposable ExitGames.Concurrency.Channels.ISubscriber< T >.SubscribeToLast ( IFiber  fiber,
Action< T >  receive,
int  intervalInMs 
)

Subscription that delivers the latest message to the consuming thread. If a newer message arrives before the consuming thread has a chance to process the message, the pending message is replaced by the newer message. The old message is discarded.

Parameters
fiber
receive
intervalInMs
Returns

Implemented in ExitGames.Messaging.Channels.TopicPublishChannel< T >, and ExitGames.Concurrency.Channels.Channel< T >.