Package java.util.concurrent.atomic

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


      {
        PredictionForSequence prediction = (PredictionForSequence)currentNode.getState();
        if (pathToInit.size() == WLength && prediction.prediction == MarkovOutcome.positive)
        {
          long countInPTA=prediction.occurrence.firstElem;
          if (countInPTA > maxCount.longValue())
            maxCount.set(countInPTA);
        }
      }

      @Override
View Full Code Here


      {
        PredictionForSequence prediction = (PredictionForSequence)currentNode.getState();
        if (pathToInit.size() == WLength && prediction.prediction == MarkovOutcome.positive)
        {
          long countInPTA=prediction.occurrence.firstElem;
          if (countInPTA < maxCount.longValue()/2) // paths that are very common are likely to be present from a number of different states and as such not very good for discriminating between them.
          {
            System.out.println("looking at path "+pathToInit+" with freq "+countInPTA);
            LinkedList<Label> path = new LinkedList<Label>();for(PTAExplorationNode elem:pathToInit) path.addFirst(elem.getInput());
            long value = computeInconsistencyForMergingPath(path, checker);
            System.out.println("got inconsistencyt of "+value);
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

            Disc disc = new Disc(file);
            try {
              long oid = db.store(disc);
              if (cnt.incrementAndGet() % 100 == 0) {
                System.out.println(cnt.longValue() + " " + file + " oid=" + oid);
              }
            } catch (Exception ex) {
              System.err.println("Could not store " + file + " Reason: " + ex.getMessage());
            }
            return false;
View Full Code Here

                  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

         }
      }

      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.