Examples of decrementAndGet()


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

        executor = new ThreadPoolExecutor(getMinSpareThreads(), getMaxThreads(), maxIdleTime, TimeUnit.MILLISECONDS,taskqueue, tf) {
      @Override
      protected void afterExecute(Runnable r, Throwable t) {
        AtomicInteger atomic = submittedTasksCount;
        if(atomic!=null) {
          atomic.decrementAndGet();
        }
      }
        };
        taskqueue.setParent( (ThreadPoolExecutor) executor);
        submittedTasksCount = new AtomicInteger();
View Full Code Here

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

        }

        // Decrement camel job count for this endpoint
        AtomicInteger number = (AtomicInteger) scheduler.getContext().get(QuartzConstants.QUARTZ_CAMEL_JOBS_COUNT);
        if (number != null) {
            number.decrementAndGet();
        }
    }

    private void addJobInScheduler() throws Exception {
        // Add or use existing trigger to/from scheduler
View Full Code Here

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

    }

    private static void decrementJobCounter(Scheduler scheduler) throws SchedulerException {
        AtomicInteger number = (AtomicInteger) scheduler.getContext().get("CamelJobs");
        if (number != null) {
            number.decrementAndGet();
        }
    }

    private static void incrementJobCounter(Scheduler scheduler) throws SchedulerException {
        AtomicInteger number = (AtomicInteger) scheduler.getContext().get("CamelJobs");
View Full Code Here

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

      Long key = Long.valueOf(cr.getHRegion().getRegionId());
      ConcurrentHashMap<Long, AtomicInteger> compactions =
        cr.isMajor() ? majorCompactions : minorCompactions;
      AtomicInteger count = compactions.get(key);
      if (count != null) {
        count.decrementAndGet();
      }
    }

    public void finishRequest() {
      this.compactSelection.finishRequest();
View Full Code Here

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

        if (refCounter == null)
        {
            return 0;
        }

        int layer = refCounter.decrementAndGet();

        if (layer == 0)
        {
            refCounterMap.remove(qualifierKey);
        }
View Full Code Here

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

                        responseHandler.response(null);
                }
                finally
                {
                    totalHintsInProgress.decrementAndGet();
                    targetHints.decrementAndGet();
                }
            }
        };

        return (Future<Void>) StageManager.getStage(Stage.MUTATION).submit(runnable);
View Full Code Here

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

        }

        // Decrement camel job count for this endpoint
        AtomicInteger number = (AtomicInteger) scheduler.getContext().get(QuartzConstants.QUARTZ_CAMEL_JOBS_COUNT);
        if (number != null) {
            number.decrementAndGet();
        }
    }

    private void addJobInScheduler() throws Exception {
        // Add or use existing trigger to/from scheduler
View Full Code Here

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

        }

        // Decrement camel job count for this endpoint
        AtomicInteger number = (AtomicInteger) scheduler.getContext().get(QuartzConstants.QUARTZ_CAMEL_JOBS_COUNT);
        if (number != null) {
            number.decrementAndGet();
        }
    }

    private void addJobInScheduler() throws Exception {
        // Add or use existing trigger to/from scheduler
View Full Code Here

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

  protected void decrementFileID(int fileID) {
    AtomicInteger counter = fileIDCounts.get(fileID);
    Preconditions.checkState(counter != null, "null counter "
        + channelNameDescriptor);
    int count = counter.decrementAndGet();
    if(count == 0) {
      fileIDCounts.remove(fileID);
    }
  }
View Full Code Here

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

    Thread t = new Thread(){
      @Override
      public void run(){
        Threads.sleep(1000);
        Assert.assertFalse(checkPoint.get());
        ai.decrementAndGet();
        ap.tasksDone.incrementAndGet();
        checkPoint2.set(true);
      }
    };
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.