Gets the maximum number of jobs which are allowed to initialize in the
job queue.

@param queue queue name.
@return maximum number of jobs allowed to be initialized per user.
@throws IllegalArgumentException if maximum number of users is negative
or zero.
353426
public int getMaxJobsPerUserToInitialize(String queue) {
    int maxJobsPerUser = rmConf.getInt(toFullPropertyName(queue,
        "maximum-initialized-jobs-per-user"), 
        defaultMaxJobsPerUsersToInitialize);
    if(maxJobsPerUser <= 0) {
      throw new IllegalArgumentException(
          "Invalid maximum jobs per user configuration " + maxJobsPerUser);
    }
    return maxJobsPerUser;
  }
574791
public static int getQueueSize() {
        if (instance != null && instance.executor != null) {
            return instance.executor.getQueue().size();
        } else {
            return 0;
        }
    }
604210
static int getPoaThreadPoolMax() {
        if (!thread_pool_max_done) {
            final String str = System.getProperty("jacorb.poa.thread_pool_max");
            int value;
            try {
                value = Integer.parseInt(str);
                if (value > 0) {
                    thread_pool_max = value;
                }
            } catch (final NumberFormatException e) {
            }
            thread_pool_max_done = true;
        }
        return thread_pool_max;
    }
941820
public static int getQueuedTaskCount() {
    Thread t;
    ForkJoinPool.WorkQueue q;
    if ((t = Thread.currentThread()) instanceof ForkJoinWorkerThread)
      q = ((ForkJoinWorkerThread) t).workQueue;
    else
      q = ForkJoinPool.commonSubmitterQueue();
    return (q == null) ? 0 : q.queueSize();
  }
1337020
public long getNumberOfQueuedMessages()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getNumberOfQueuedMessages");

    long total = 0;
    try
    {
      total = referenceItemStream.getStatistics().getTotalItemCount();
    }
    catch (MessageStoreException e)
    {
      FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.runtime.LocalSubscriptionControl.getNumberOfQueuedMessages",
          "1:422:1.36", 
          this);
      
      SibTr.exception(tc, e);
    }
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())             
      SibTr.exit(tc, "getNumberOfQueuedMessages", new Long(total));
    return total;
  }
768608
@Override
    public java.util.concurrent.Future<GetQueueUrlResult> getQueueUrlAsync(String queueName) {

        return getQueueUrlAsync(new GetQueueUrlRequest().withQueueName(queueName));
    }
782282
public function getPendingJobsCount($queue)
    {
        $driver_class = "\\Eyewitness\\Eye\\Queue\\Handlers\\".ucfirst(strtolower($queue->driver)).'Queue';

        if (! class_exists($driver_class)) {
            $this->eye->logger()->error('Queue Driver does not exist', $driver_class);
            return 0;
        }

        try {
            $qm = app(QueueManager::class)->connection($queue->connection);

            return (new $driver_class($qm, $queue))->pendingJobsCount($queue->tube);
        } catch (Exception $e) {
            $this->eye->logger()->debug('Unable to find Queue connection', ['exception' => $e->getMessage(), 'connection' => $queue->connection]);
        }

        return -1;
    }
36158
private boolean incSlotLimit(JobInfo info, TaskType type, LimitType limit) {
    switch (limit) {
      case MIN:
        if (type == TaskType.MAP) {
          if (info.minMaps < runnableTasks(info, type)) {
            info.minMaps += 1;
            return true;
          }
        } else {
          if (info.minReduces < runnableTasks(info, type)) {
            info.minReduces += 1;
            return true;
          }
        }
        return false;
      case MAX:
        if (type == TaskType.MAP) {
          if (info.maxMaps < runnableTasks(info, type)) {
            info.maxMaps += 1;
            return true;
          }
        } else {
          if (info.maxReduces < runnableTasks(info, type)) {
            info.maxReduces += 1;
            return true;
          }
        }
        return false;
    }
    // Never come here
    return false;
  }
1153721
public long getNumberOfQueuedMessages()
  {
    long count = 0;
    try
    {
      count = itemStream.getStatistics().getTotalItemCount();
    }
    catch (MessageStoreException e)
    {
      FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.runtime.LocalQueuePoint.getNumberOfQueuedMessages",
          "1:494:1.58", 
          this);
      SibTr.exception(tc, e);
    }    
    return count;
  }
918982
public boolean isQueue(String queueName) throws Exception {
        Address addr = Address.root().add(SUBSYSTEM, SUBSYSTEM_MESSAGING, HORNETQ_SERVER, "default");
        String haystack = JMS_QUEUE;
        return null != findNodeInList(addr, haystack, queueName);
    }
1123480
@Override
    public void setJobQueue(int jobId, Queue queue)
    {
        JqmClientFactory.getClient().setJobQueue(jobId, queue);
    }
446970
def getJobGraphWhoseServicesAreRunning(self, maxWait):
        
        try:
            jobGraph = self._jobGraphsWithServicesThatHaveStarted.get(timeout=maxWait)
            self.jobGraphsWithServicesBeingStarted.remove(jobGraph)
            assert self.jobsIssuedToServiceManager >= 0
            self.jobsIssuedToServiceManager -= 1
            return jobGraph
        except Empty:
            return None
20201
@Override
    public long getCumulativeJobInstancesCount()
    {
        DbConn em2 = Helpers.getNewDbSession();
        try
        {
            return em2.runSelectSingle("history_select_count_for_poller", Long.class, this.queue.getId(), this.engine.getNode().getId());
        }
        finally
        {
            Helpers.closeQuietly(em2);
        }
    }
632697
@Override
    public int enqueue(JobRequest jd)
    {
        try
        {
            return target.path("ji").request().post(Entity.entity(jd, MediaType.APPLICATION_XML), JobInstance.class).getId();
        }
        catch (BadRequestException e)
        {
            throw new JqmInvalidRequestException(e.getResponse().readEntity(String.class), e);
        }
        catch (Exception e)
        {
            throw new JqmClientException(e);
        }
    }
1160289
public static <T> Iterator<T> iterator(BlockingQueue<T> queue)
    {
        return iterator(queue, Long.MAX_VALUE, TimeUnit.MILLISECONDS);
    }
185185
def _obtain_queue(num_jobs):
    
    if _should_use_multiprocessing(num_jobs):
        return ReprQueue(multiprocessing.Manager().Queue())

    return ReprQueue(Queue())
288804
@Override
    public int getBatcherQueueMaxMessages(String batcherName) {
        return CONFIGURATION.getIntProperty(
                batcherName + "." + "queue.maxMessages",
                Integer.valueOf(this.getPropertyValue(batcherName + "."
                        + "queue.maxMessages", "10000"))).get();
    }