Package java.util.concurrent.atomic

Examples of java.util.concurrent.atomic.AtomicInteger.wait()


                        dialog.setVisible(true);
                    }
                });
                synchronized (answer) {
                    while (answer.get() == AbstractOracle.USER_WAITINGFORSELECTION) {
                        answer.wait();// wait for a user to make a response
                    }
                }
            } catch (InvocationTargetException e) {
                //e.printStackTrace();
                // if we cannot make a call, return a negative number - nothing do not know what else to do about it.
View Full Code Here


        });
       
        // wait for the inserts to finish
        synchronized (notReady) {
            if (notReady.get() > 0) {
                notReady.wait();
            }
        }
       
        // retrieve the databases
        test0 = babu1.getDatabaseManager().getDatabase("0");
View Full Code Here

        });
       
        // wait for the inserts to finish
        synchronized (notReady) {
            if (notReady.get() > 0) {
                notReady.wait();
            }
        }
       
    /*
     * prefix
 
View Full Code Here

        }
   
        // wait for the last response
        synchronized (openChunks) {
            if (openChunks.get()>0)
                openChunks.wait();
        }

        // some chunks failed -> retry
        if (openChunks.get() == -1) return;
       
View Full Code Here

            }
           
            // block until all inserts are finished
            synchronized (count) {
                while (count.get() > 0)
                    count.wait();
            }
           
            // at least one insert failed
            if (count.get() == -1) {
                throw new LogEntryException("At least one insert could not be" +
View Full Code Here

            ReusableBuffer plb = ReusableBuffer.wrap(pl.getBytes());
            l.append(new LogEntry(plb, sl, LogEntry.PAYLOAD_TYPE_INSERT));
        }
        synchronized (count) {
            if (count.get() < 100)
                count.wait(1000);
        }
       
        try {
            l.lock();
            l.switchLogFile(false);
View Full Code Here

            l.append(new LogEntry(plb, sl, LogEntry.PAYLOAD_TYPE_INSERT));
        }
       
        synchronized (count) {
            if (count.get() < 200)
                count.wait(1000);
        }
    }
   
    @Test
    public void testReadLogfile() throws Exception {
View Full Code Here

            ReusableBuffer plb = ReusableBuffer.wrap(pl.getBytes());
            l.append(new LogEntry(plb, sl, LogEntry.PAYLOAD_TYPE_INSERT));
        }
        synchronized (count) {
            if (count.get() < 100)
                count.wait(1000);
        }
       
        System.out.println("finished writing");
       
        try {
View Full Code Here

                totalSize = offsets[offsets.length - 1] + entrySize;
            l.append(e);
        }
        synchronized (count) {
            while (count.get() < 100)
                count.wait(1000);
        }
       
        System.out.println("finished writing");
       
        try {
View Full Code Here

            ReusableBuffer plb = ReusableBuffer.wrap(pl.getBytes());
            l.append(new LogEntry(plb, sl, LogEntry.PAYLOAD_TYPE_INSERT));
        }
        synchronized (count) {
            if (count.get() < 121)
                count.wait(1000);
        }
       
        File[] logFiles = new File(testdir).listFiles();
        DiskLogIterator it = new DiskLogIterator(logFiles, null);
        for (int i = 0; i < 120; i++) {
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.