예제 #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;
 }