/** Parse state of the queue from the configuration. */ Queue.QueueState getQueueState(String name, Configuration conf) { return conf.getEnum( toFullPropertyName(name, QueueManager.QUEUE_STATE_SUFFIX), Queue.QueueState.RUNNING); }
/** * Checks whether the given queue is running or not. * @param queueName name of the queue * @return true, if the queue is running. */ synchronized boolean isRunning(String queueName) { Queue q = queues.get(queueName); return q != null && Queue.QueueState.RUNNING.equals(q.getState()); }