Codota Logo
OrderSupervisorStage
Code IndexAdd Codota to your IDE (free)

How to use
OrderSupervisorStage
in
com.ociweb.pronghorn.network

Best Java code snippets using com.ociweb.pronghorn.network.OrderSupervisorStage (Showing top 10 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: oci-pronghorn/Pronghorn

public static OrderSupervisorStage newInstance(GraphManager graphManager, 
    Pipe<ServerResponseSchema>[] inputPipes, 
    Pipe<HTTPLogResponseSchema> log,
    //Pipe<AlertNoticeSchema> alerts, //can be null...new pipe schema for alerts
    Pipe<NetPayloadSchema>[] outgoingPipes, 
    ServerCoordinator coordinator, boolean isTLS) {
  return new OrderSupervisorStage(graphManager, inputPipes, log, outgoingPipes, coordinator);
}
origin: oci-pronghorn/Pronghorn

private boolean checkSeqAndProcessInput(final Pipe<ServerResponseSchema> sourcePipe, int pipeIdx, boolean keepWorking,
    int peekMsgId, int myPipeIdx, long channelId, int sequenceNo, int idx,
    int expected) {
    
  if ((0==sequenceNo) || (sequenceNo >= expected)) {
    if ((0==sequenceNo) || (expected == sequenceNo)) {
      keepWorking = processExpectedSequenceValue(sourcePipe, pipeIdx,
          keepWorking, peekMsgId,
          myPipeIdx, sequenceNo, 
          channelId, idx, expected);
      
      //System.out.println("sequence matched "+sequenceNo);
      
    } else {
      
      //TODO: why get backs...
      //System.out.println("for channel:"+channelId+" waiting for: "+expected+" but got "+sequenceNo );
      
      assert(hangDetect(pipeIdx, sequenceNo, channelId, expected));
      assert(sequenceNo>expected) : "found smaller than expected sequenceNo, they should never roll back";
      assert(Pipe.bytesReadBase(sourcePipe)>=0);
      keepWorking = false;
    }
  } else {
    
    keepWorking = badSequenceNumberProcessing(channelId, sequenceNo, expected);
  }
  
  return keepWorking;
}
origin: oci-pronghorn/Pronghorn

private int copyDataBlock(final Pipe<ServerResponseSchema> sourcePipe, int pipeIdx, int peekMsgId,
    int myPipeIdx, int sequenceNo, long channelId, boolean beginningOfResponse) {
  
  failureIterations = -1;//clears the flag to let hang detector know we are ok.			        		
  Pipe<NetPayloadSchema> outPipe = outgoingPipes[myPipeIdx];
  
  assert(recordInputs(channelId, sequenceNo, pipeIdx));			        		
  if (!isTLS) {
  } else {
    finishHandshake(outPipe, channelId);
  }
  assert(Pipe.bytesReadBase(sourcePipe)>=0);				
  int responses = copyDataBlock(sourcePipe, peekMsgId, myPipeIdx, sequenceNo, channelId, beginningOfResponse);							
  assert(Pipe.bytesReadBase(sourcePipe)>=0);
  return responses;
}
origin: oci-pronghorn/Pronghorn

if (-1 == expectedPipe) {
  expectedSquenceNosPipeIdx[idx]=(short)pipeIdx;
  int responses = copyDataBlock(sourcePipe, pipeIdx, peekMsgId, 
      myPipeIdx, sequenceNo,
      channelId, true);
    int responses = copyDataBlock(sourcePipe, pipeIdx, peekMsgId, 
        myPipeIdx, sequenceNo,
        channelId, false);
      keepWorking = false; //break out
    } else {
      assert(hangDetect(pipeIdx, sequenceNo, channelId, expected));
origin: oci-pronghorn/Pronghorn

/**
 * Data arrives from random input pipes, but each message has a channel id and squence id.
 * Data is ordered by sequence number and sent to the pipe from the pool belonging to that specific channel id
 * @param graphManager
 * @param inputPipes _in_ The server response which will be supervised.
 * @param log _out_ The log output pipe.
 * @param outgoingPipes _out_ The net payload after order is enforced.
 * @param coordinator
 * @param isTLS
 */
public OrderSupervisorStage(GraphManager graphManager, 
               Pipe<ServerResponseSchema>[][] inputPipes, 
               Pipe<HTTPLogResponseSchema> log,
               Pipe<NetPayloadSchema>[] outgoingPipes,
               ServerCoordinator coordinator, boolean isTLS) {
  this(graphManager, join(inputPipes), log, outgoingPipes, coordinator);
}
origin: oci-pronghorn/Pronghorn

private boolean processInputData(final Pipe<ServerResponseSchema> sourcePipe, int pipeIdx, boolean keepWorking,
    int peekMsgId, int myPipeIdx, long channelId) {
  
  
  int sequenceNo = Pipe.peekInt(sourcePipe,  3);	
       //read the next non-blocked pipe, sequenceNo is never reset to zero
  //every number is used even if there is an exception upon write.
   int idx = (int)(channelId & channelBitsMask);
  
  ///////////////////
  //clear when we discover a new connection
  ///////////////////
  if ((expectedSquenceNosChannelId[idx]!=channelId) || (sequenceNo==0)) {
    expectedSquenceNosSequence[idx] = 0;
    expectedSquenceNosChannelId[idx] = channelId;
    
  }
  return checkSeqAndProcessInput(sourcePipe, pipeIdx, keepWorking, 
      peekMsgId, myPipeIdx, channelId,
      sequenceNo, idx, expectedSquenceNosSequence[idx]);

}
origin: oci-pronghorn/Pronghorn

return loadConnectionDataAndPublish(input, myPipeIdx, channelId, beginningOfResponse, 
      output, outputStream, expSeq,
      len, Pipe.takeInt(input), Pipe.byteBackingArray(meta, input), 
origin: oci-pronghorn/Pronghorn

OrderSupervisorStage.newInstance(gm, 
    inputPipes, null,
    outgoingPipes, 
origin: oci-pronghorn/Pronghorn

  Pipe<NetPayloadSchema>[] outgoingPipes, 
  ServerCoordinator coordinator) {
super(graphManager, inputPipes, null==log ? outgoingPipes : join(outgoingPipes,log));      
origin: oci-pronghorn/Pronghorn

public static void buildOrderingSupers(GraphManager graphManager, ServerCoordinator coordinator,
    Pipe<ServerResponseSchema>[][] fromModule, Pipe<HTTPLogResponseSchema>[] log,
    Pipe<NetPayloadSchema>[][] perTrackFromSuper) {
  
  int track = fromModule.length;
  while (--track>=0) {
  
    OrderSupervisorStage wrapSuper = new OrderSupervisorStage(graphManager, 
                          fromModule[track], 
                          log[track],
                          perTrackFromSuper[track], 
                          coordinator);//ensure order   

    coordinator.processNota(graphManager, wrapSuper);
  
  }
}
com.ociweb.pronghorn.networkOrderSupervisorStage

Javadoc

Consumes the sequence number in order and holds a pool entry for this connection. Sends the data in order to the right pool entry for encryption to be applied down stream.

Most used methods

  • <init>
    Data arrives from random input pipes, but each message has a channel id and squence id. Data is orde
  • badSequenceNumberProcessing
  • checkSeqAndProcessInput
  • copyDataBlock
  • finishHandshake
  • hangDetect
  • join
  • loadConnectionDataAndPublish
  • newInstance
  • processExpectedSequenceValue
  • processInputData
  • processPipe
  • processInputData,
  • processPipe,
  • publishDataBlock,
  • recordInputs,
  • requestShutdown,
  • rollupMultiAndPublish,
  • skipData,
  • writeToLog,
  • writeToNextStage

Popular in Java

  • Running tasks concurrently on multiple threads
  • startActivity (Activity)
  • getSystemService (Context)
  • orElseThrow (Optional)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • JTextField (javax.swing)
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now