Examples of take()


Examples of de.anomic.data.ymark.YMarkXBELImporter.take()

                            prop.put("result", "0");
                            return prop;
                        }
                        t = new Thread(xbelImporter, "YMarks - XBEL Importer");
                        t.start();
                        while ((bmk = xbelImporter.take()) != YMarkEntry.POISON) {
                            putBookmark(sb.tables.bookmarks, bmk_user, bmk, autoTaggingQueue, autotag, empty);
                        }
                        prop.put("result", "1");
                    } else if(post.get("importer").equals("json") && reader != null) {
                        YMarkJSONImporter jsonImporter;
View Full Code Here

Examples of edu.emory.mathcs.backport.java.util.concurrent.LinkedBlockingQueue.take()

                long timeStatus;
                LinkedBlockingQueue queue = getLinkedBlockingQueue();
                while (true) {
                    long startTime = System.currentTimeMillis();
                    try {
                        MessageContext msgCtx = (MessageContext) queue.take();
                        MailBasedOutTransportInfo transportInfo = (MailBasedOutTransportInfo) msgCtx
                                .getProperty(org.apache.axis2.Constants.OUT_TRANSPORT_INFO);
                        if (transportInfo.getInReplyTo() == null) {
                            String error = EMailSender.class.getName() +" Coudn't simulate request/response without In-Reply-To Mail header";
                            log.error(error);
View Full Code Here

Examples of java.nio.file.WatchService.take()

          + dir.getFileName());

      while (true) {
        WatchKey key;
        try {
          key = watcher.take();
        } catch (final InterruptedException ex) {
          return;
        }

        for (final WatchEvent<?> event : key.pollEvents()) {
View Full Code Here

Examples of java.util.concurrent.BlockingQueue.take()

        Thread taker=new Thread() {

            public void run() {
                try {
                    System.out.println("taking an element from the queue");
                    queue.take();
                    System.out.println("clear");
                }
                catch(InterruptedException e) {                 
                }
            }
View Full Code Here

Examples of java.util.concurrent.CompletionService.take()

                    count++;
                }

                while (count-- > 0) {
                    try {
                        completionService.take().get();
                    } catch (InterruptedException e) {
                        Thread.currentThread().interrupt();
                    } catch (ExecutionException e) {
                        Throwable cause = e.getCause();
                        if (cause instanceof Error)
View Full Code Here

Examples of java.util.concurrent.ExecutorCompletionService.take()

                    count++;
                }

                while (count-- > 0) {
                    try {
                        completionService.take().get();
                    } catch (InterruptedException e) {
                        Thread.currentThread().interrupt();
                    } catch (ExecutionException e) {
                        Throwable cause = e.getCause();
                        if (cause instanceof Error)
View Full Code Here

Examples of java.util.concurrent.LinkedBlockingQueue.take()

        Thread taker=new Thread() {

            public void run() {
                try {
                    System.out.println("taking an element from the queue");
                    queue.take();
                    System.out.println("clear");
                }
                catch(InterruptedException e) {                 
                }
            }
View Full Code Here

Examples of javax.datagrid.DataGrid.take()

    DataGrid dataGrid = new TransientDataGrid();
    String result = dataGrid.write("key", "value");
    assertEquals(result, "value");
    result = dataGrid.read("key");
    assertEquals(result, "value");
    result = dataGrid.take("key");
    assertEquals(result, "value");
    result = dataGrid.read("key");
    assertNull(result);
    result = dataGrid.read("newKey");
    assertNull(result);
View Full Code Here

Examples of net.jini.space.JavaSpace05.take()

        // corresponds to comments #6 to this method:
        templates.add((SimpleEntry) sampleEntry1.clone());
        templates.add("Not an antry");
        JavaSpace05 space05 = (JavaSpace05) space;
        try {
            space05.take(templates, null, instantTime, MAX_ENTRIES);
            throw new TestException("IllegalArgumentException is not thrown "
                                    + "when templates contain not an instance "
                                    + "of Entry element");
        } catch (IllegalArgumentException e) {}
View Full Code Here

Examples of net.openhft.chronicle.sandbox.queue.LocalConcurrentBlockingObjectQueue.take()

            }
        });

        await(pleaseTake);
        assertEquals(0, q.remainingCapacity());
        assertEquals(0, q.take());

        await(pleaseInterrupt);
        assertThreadStaysAlive(t);
        t.interrupt();
        awaitTermination(t);
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.