Package java.util.concurrent.atomic

Examples of java.util.concurrent.atomic.AtomicLong.longValue()


         int resultLastPost = JournalImpl.readJournalFile(fileFactory, file, new JournalReaderCallback()
         {

            private void checkID(final long id)
            {
               if (id > maxID.longValue())
               {
                  maxID.set(id);
               }
            }
View Full Code Here


         }
      }

      checkReclaimStatus();

      return new JournalLoadInformation(records.size(), maxID.longValue());
   }

   /**
    * @return true if cleanup was called
    */
 
View Full Code Here

         int resultLastPost = JournalImpl.readJournalFile(fileFactory, file, new JournalReaderCallback()
         {

            private void checkID(final long id)
            {
               if (id > maxID.longValue())
               {
                  maxID.set(id);
               }
            }
View Full Code Here

      state = JournalImpl.STATE_LOADED;

      checkReclaimStatus();

      return new JournalLoadInformation(records.size(), maxID.longValue());
   }

   /**
    * @return true if cleanup was called
    */
 
View Full Code Here

         int resultLastPost = JournalImpl.readJournalFile(fileFactory, file, new JournalReaderCallback()
         {

            private void checkID(final long id)
            {
               if (id > maxID.longValue())
               {
                  maxID.set(id);
               }
            }
View Full Code Here

      state = JournalImpl.STATE_LOADED;

      checkReclaimStatus();

      return new JournalLoadInformation(records.size(), maxID.longValue());
   }

   /**
    * @return true if cleanup was called
    */
 
View Full Code Here

            node3 = new SgsTestNode(serverNode, null, null);
            // We expect to see one notification for a started node
            AtomicLong count = listener.notificationMap.get(
                                NodesMXBean.NODE_STARTED_NOTIFICATION);
            assertNotNull(count);
            assertEquals(1, count.longValue());
           
            // and no notifications for failed nodes
            assertNull(listener.notificationMap.get(
                                NodesMXBean.NODE_FAILED_NOTIFICATION));
        } finally {
View Full Code Here

                "com.sun.sgs.impl.service.watchdog.server.renew.interval"));
            Thread.sleep(renewTime * 2);
            AtomicLong count = listener.notificationMap.get(
                                NodesMXBean.NODE_FAILED_NOTIFICATION);
            assertNotNull(count);
            assertEquals(1, count.longValue());
        }
        notifyProxy.removeNotificationListener(listener);
    }
   
    @Test
View Full Code Here

         @Override
         public void afterFile(int file) {
            // noop
         }
      });
      while (tasksSubmitted.longValue() > tasksFinished.longValue()) {
         synchronized (context) {
            try {
               context.wait(100);
            } catch (InterruptedException e) {
               log.error("Iteration was interrupted", e);
View Full Code Here

            producer.send(message);
            count.incrementAndGet();

            if (transacted)
            {
               if (count.longValue() % txBatchSize == 0)
               {
                  session.commit();
               }
            }
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.