Sage Modeling and Simulation Library

Highpoint.Sage.ItemBased.Servers Namespace

Classes


  Class Description
Public class BufferedServer
A buffered server maintains a buffer before and after (both, optionally) a server, so that the server can act as a process step of arbitrarily large capacity that accepts service objects, and has them wait until the core server is ready for them. The effect of the output queue is that the server may always move on to the next service object, irrespective of whether the downstream process step is ready for the current service object.

The constructors will accept an externally-provided server, for custom service behaviors, or will provide a simple, single-client server by default.

Public class MultiChannelDelayServer
Public class ResourceServer
A resource server is a server that acquires a resource on behalf of an object presented at its input port, waits a particular duration, releases that resource, and passes the object to its output port.

The ResourceServer is aware of a ResourcePool, and when the ResourceServer is placed in service, or the ResourcePool fires a Release event, the resource server attampts to pull and service a new object from its input port.

Public class ServerPlus
A 'server plus' is a server that can decide whether it can provide service based on some outside criteria, then do something (i.e. setup) before starting service, and something else (i.e. teardown) before completing service.
Public class SimpleServer
A SimpleServer is a single-channeled server that accepts one object from its input port, waits a specified timespan, and then presents that object to its output port. It does not permit its own outputs to be refused.

When a server becomes idle, it attempts to pull from its input port. If it is successful, it becomes busy for a timespan, determined by a timespan distribution after which the object is presented to its output port. Once the object at its output port is taken, the server becomes idle. If an object is presented on its input port and it is busy, it rejects the presentation by returning false. If it is not busy when the presentation is made, then it accepts the new arrival, and commences working on it for a timespan. When the timespan expires, the object is placed on its output port.

Interfaces


  Interface Description
Public interface IServer
An object that implements IServer receives objects on an input port, and some time later, emits them from its Output port. If the model's SupportsServiceObjects property is set to true, and the received object is an implementer of IServiceObject, then that object's OnServiceBeginning and OnServiceCompleting events are fired as the object is received, and later, emitted.
Public interface IServiceObject
Optional interface for a service object, in case it wants to be notified of its stages of participation with, or processing by, a server.

Delegates


  Delegate Description
Public delegate ServiceEvent
Implemented by an object wishing to receive notification of the commencement or completion of service of an object.
Public delegate ServiceRequestEvent
Implemented by an object wishing to participate in the decision of whether a service object can be serviced.