Package java.util.concurrent.atomic

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


                  else if (httpMethod.equals("HEAD")) method = new HeadResourceMethod();

                  method.setClazz(rm.getResourceClass().getName());
                  method.setMethod(rm.getMethod().getName());
                  AtomicLong stat = rm.getStats().get(httpMethod);
                  if (stat != null) method.setInvocations(stat.longValue());
                  else method.setInvocations(0);

                  if (rm.getProduces() != null)
                  {
                     for (MediaType mediaType : rm.getProduces())
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

         }
      }

      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

    }
   
    Assert.assertTrue(allTrue(done));
    int count = counter.get();
    Assert.assertEquals(NUM_THREADS * REPETITIONS, count);
    long time = timer.longValue();
    logger.debug("{} total time (ms):   {}", test,  time);
    logger.debug("{} average time (ms): {}\n", test, (double)time / count);
  }
 
  static final DataSourceFactory SIMPLE_FACTORY = new DataSourceFactory() {
View Full Code Here

    }
    watch.stop();
    destroy();

    LOG.debug("Number of Tasks: {}", callables.size());
    final long averageExecutionTime = callables.size() != 0 ? totalTime.longValue() / callables.size() : 0;
    LOG.debug("Average Execution Time: {}", averageExecutionTime);
    LOG.debug("Total Task Time: {}", totalTime);
    LOG.debug("Grand Total Execution Time: {}", System.currentTimeMillis() - start);
    LOG.debug(watch.prettyPrint());
  }
View Full Code Here

     
      for (String character : keyList) {
     
        AtomicLong counter = nodeCountMap.get(character);
       
        overallNodeCounter.addAndGet(counter.longValue());
       
        log.info(" [ "+character+" ] = " + counter.longValue());
       
      }
     
View Full Code Here

     
        AtomicLong counter = nodeCountMap.get(character);
       
        overallNodeCounter.addAndGet(counter.longValue());
       
        log.info(" [ "+character+" ] = " + counter.longValue());
       
      }
     
      log.info("overall node count = " + overallNodeCounter.longValue());
     
View Full Code Here

         }
      }

      checkReclaimStatus();

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

   /**
    * @return true if cleanup was called
    */
 
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.