Пример #1
0
 internal BoundedLogAdapter(Image image, ReadableCounter upperBound, ClusteredServiceAgent agent)
 {
     fragmentAssembler = new ImageControlledFragmentAssembler(this, INITIAL_BUFFER_LENGTH);
     this.image        = image;
     this.upperBound   = upperBound;
     this.agent        = agent;
 }
Пример #2
0
        private ClusteredServiceContainer(Context ctx)
        {
            this.ctx = ctx;
            ctx.Conclude();

            ClusteredServiceAgent agent = new ClusteredServiceAgent(ctx);

            serviceAgentRunner = new AgentRunner(ctx.IdleStrategy(), ctx.ErrorHandler(), ctx.ErrorCounter(), agent);
        }
Пример #3
0
 internal ClientSession(
     long sessionId,
     int responseStreamId,
     string responseChannel,
     byte[] encodedPrincipal,
     ClusteredServiceAgent clusteredServiceAgent)
 {
     Id = sessionId;
     ResponseStreamId       = responseStreamId;
     ResponseChannel        = responseChannel;
     EncodedPrincipal       = encodedPrincipal;
     _clusteredServiceAgent = clusteredServiceAgent;
 }
Пример #4
0
 internal ClientSession(
     long sessionId,
     long correlationId,
     int responseStreamId,
     string responseChannel,
     byte[] encodedPrincipal,
     ClusteredServiceAgent cluster)
 {
     _id = sessionId;
     _lastCorrelationId = correlationId;
     _responseStreamId  = responseStreamId;
     _responseChannel   = responseChannel;
     _encodedPrincipal  = encodedPrincipal;
     _cluster           = cluster;
 }
Пример #5
0
        internal ClientSession(
            long sessionId,
            long correlationId,
            int responseStreamId,
            string responseChannel,
            byte[] encodedPrincipal,
            ClusteredServiceAgent cluster)
        {
            _id = sessionId;
            _lastCorrelationId = correlationId;
            _responseStreamId  = responseStreamId;
            _responseChannel   = responseChannel;
            _encodedPrincipal  = encodedPrincipal;
            _cluster           = cluster;

            UnsafeBuffer headerBuffer = new UnsafeBuffer(new byte[SESSION_HEADER_LENGTH]);

            _sessionHeaderEncoder.WrapAndApplyHeader(headerBuffer, 0, new MessageHeaderEncoder()).ClusterSessionId(sessionId);

            _vectors[0] = new DirectBufferVector(headerBuffer, 0, SESSION_HEADER_LENGTH);
            _vectors[1] = _messageBuffer;
        }
        private ClusteredServiceContainer(Context ctx)
        {
            this.ctx = ctx;

            try
            {
                ctx.Conclude();
            }
            catch (Exception)
            {
                if (null != ctx.MarkFile())
                {
                    ctx.MarkFile().SignalFailedStart();
                }

                throw;
            }

            ClusteredServiceAgent agent = new ClusteredServiceAgent(ctx);

            serviceAgentRunner = new AgentRunner(ctx.IdleStrategy(), ctx.ErrorHandler(), ctx.ErrorCounter(), agent);
        }
Пример #7
0
 internal ServiceSnapshotLoader(Image image, ClusteredServiceAgent agent)
 {
     this.image = image;
     this.agent = agent;
 }
Пример #8
0
 public ServiceAdapter(Subscription subscription, ClusteredServiceAgent clusteredServiceAgent)
 {
     this.subscription          = subscription;
     this.clusteredServiceAgent = clusteredServiceAgent;
 }
Пример #9
0
 internal BoundedLogAdapter(ClusteredServiceAgent agent)
 {
     this.agent = agent;
 }
Пример #10
0
 public ServiceAdapter(Subscription subscription, ClusteredServiceAgent clusteredServiceAgent)
 {
     this.subscription          = subscription;
     this.clusteredServiceAgent = clusteredServiceAgent;
     this.fragmentAssembler     = new FragmentAssembler(OnFragment);
 }
Пример #11
0
 internal ServiceSnapshotLoader(Image image, ClusteredServiceAgent agent)
 {
     this.fragmentAssembler = new ImageControlledFragmentAssembler(this);
     this.image             = image;
     this.agent             = agent;
 }