Examples of offer()


Examples of edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue.offer()

        }
        if (Thread.currentThread() == worker) {
            dispatcher.dispatch(session, event);
        } else {
            BlockingQueue queue = worker.queue;
            if (!queue.offer(event)) {
                // flow control
                if (elapsedTime.getElapsedTime() >= 10000) {
                    elapsedTime.reset();
                    log.warn("dispatcher flow control");
                }
View Full Code Here

Examples of io.druid.query.aggregation.Histogram.offer()

      breaks[i] = min + stride * i;
    }

    Histogram h = new Histogram(breaks);
    for (float v : values) {
      h.offer(v);
    }
    double[] hcounts = h.asVisual().counts;

    ApproximateHistogram ah1 = new ApproximateHistogram(resolution);
    ApproximateHistogram ah2 = new ApproximateHistogram(combinedResolution);
View Full Code Here

Examples of io.netty.handler.codec.http.CookieDecoder.offer()

            }
        } else {
            // New chunk is received
            HttpChunk chunk = (HttpChunk) e.getMessage();
            try {
                decoder.offer(chunk);
            } catch (ErrorDataDecoderException e1) {
                e1.printStackTrace();
                responseContent.append(e1.getMessage());
                writeResponse(e.getChannel());
                Channels.close(e.getChannel());
View Full Code Here

Examples of io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.offer()

    nettyRequest.headers().add(HttpHeaders.Names.CONTENT_TYPE, request.getBody().getContentType().toString());
    HttpPostRequestDecoder decoder = new HttpPostRequestDecoder(nettyRequest);

    HttpContent content = new DefaultHttpContent(requestBody.getBuffer());

    decoder.offer(content);
    decoder.offer(LastHttpContent.EMPTY_LAST_CONTENT);

    Map<String, List<String>> attributes = new LinkedHashMap<>();
    Map<String, List<UploadedFile>> files = new LinkedHashMap<>();
View Full Code Here

Examples of java.util.LinkedList.offer()

    s += "\n*********CFG******** \n" + this.m_regionAnalysis.CFGtoString(this.m_blockCFG, true);
    s += "\n*********PDG******** \n";
   
    List<PDGNode> processed = new ArrayList<PDGNode>();
    Queue nodes = new LinkedList();
    nodes.offer(this.m_startNode);
   
    while(nodes.peek() != null)
    {
      PDGNode node = (PDGNode) nodes.remove();
      processed.add(node);
View Full Code Here

Examples of java.util.LinkedList.offer()

        s += "   Target: " + succ.toShortString();
        s += "\n";
       
        if(labels.get(0).equals("dependency"))
        if(!processed.contains(succ))
          nodes.offer(succ);
       
      }
     
      s += "\n End PDGNode.";
     
View Full Code Here

Examples of java.util.Queue.offer()

    s += "\n*********CFG******** \n" + this.m_regionAnalysis.CFGtoString(this.m_blockCFG, true);
    s += "\n*********PDG******** \n";
   
    List<PDGNode> processed = new ArrayList<PDGNode>();
    Queue nodes = new LinkedList();
    nodes.offer(this.m_startNode);
   
    while(nodes.peek() != null)
    {
      PDGNode node = (PDGNode) nodes.remove();
      processed.add(node);
View Full Code Here

Examples of java.util.Queue.offer()

        s += "   Target: " + succ.toShortString();
        s += "\n";
       
        if(labels.get(0).equals("dependency"))
        if(!processed.contains(succ))
          nodes.offer(succ);
       
      }
     
      s += "\n End PDGNode.";
     
View Full Code Here

Examples of java.util.Queue.offer()

    public static void readActionQueue(MarshallerReaderContext context) throws IOException, ClassNotFoundException {
        ReteooWorkingMemory wm = (ReteooWorkingMemory) context.wm;
        Queue actionQueue = wm.getActionQueue();
        while ( context.readShort() == PersisterEnums.WORKING_MEMORY_ACTION ) {
            actionQueue.offer( PersisterHelper.readWorkingMemoryAction( context ) );
        }
    }

    public static void readTruthMaintenanceSystem(MarshallerReaderContext context) throws IOException {
        ObjectInputStream stream = context.stream;
View Full Code Here

Examples of java.util.Queue.offer()

    public static void readActionQueue(MarshallerReaderContext context) throws IOException {
        ReteooWorkingMemory wm = (ReteooWorkingMemory) context.wm;
        Queue actionQueue = wm.getActionQueue();
        while ( context.readShort() == PersisterEnums.WORKING_MEMORY_ACTION ) {
            actionQueue.offer( PersisterHelper.readWorkingMemoryAction( context ) );
        }
    }

    public static void readTruthMaintenanceSystem(MarshallerReaderContext context) throws IOException {
        ObjectInputStream stream = context.stream;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.