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

        if(!simulating.get()) throw new IllegalStateException("Must be in simulation mode");
        AtomicLong time;
        synchronized(sleepTimesLock) {
            time = threadSleepTimes.get(t);
        }
        return !t.isAlive() || time!=null && currentTimeMillis() < time.longValue();
    }   
}
View Full Code Here

        if(!simulating.get()) throw new IllegalStateException("Must be in simulation mode");
        AtomicLong time;
        synchronized(sleepTimesLock) {
            time = threadSleepTimes.get(t);
        }
        return !t.isAlive() || time!=null && currentTimeMillis() < time.longValue();
    }   
}
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

      {
        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.
          {
            LinkedList<Label> path = new LinkedList<Label>();for(PTAExplorationNode elem:pathToInit) path.addFirst(elem.getInput());
            long value = computeInconsistencyForMergingPath(path, checker);
            if (value >= 0)
            {
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())
            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.
          {
            LinkedList<Label> path = new LinkedList<Label>();for(PTAExplorationNode elem:pathToInit) path.addFirst(elem.getInput());
            long value = computeInconsistencyForMergingPath(path, checker);
            if (value >= 0)
            {
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.