Examples of Priority


Examples of org.apache.log4j.Priority

     * Tests LoggingEvent.getLocationInfo() when no FQCN is specified.
     * See bug 41186.
     */
  public void testLocationInfoNoFQCN() {
      Category root = Logger.getRootLogger();
    Priority level = Level.INFO;
      LoggingEvent event =
        new LoggingEvent(
          null, root, 0L,  level, "Hello, world.", null);
      LocationInfo info = event.getLocationInformation();
    //
View Full Code Here

Examples of org.apache.log4j.Priority

     * on the message parameter does not propagate to caller.
     * See bug 37182.
     */
    public void testBadMessage() {
        Category root = Logger.getRootLogger();
        Priority info = Level.INFO;
        String catName = Logger.class.toString();
        BadMessage msg = new BadMessage();
        LoggingEvent event =
          new LoggingEvent(
            catName, root, 0L,  info, msg, null);
View Full Code Here

Examples of org.apache.log4j.Priority

        return true;
    }

    public void publish(final LogRecord record) {
        Logger targetLogger = Logger.getLogger(record.getLoggerName());
        final Priority targetLevel = levelMapper.getTargetLevelForSourceLevel(record.getLevel());
        final String text = formatRecord(record);
        targetLogger.log(LOGGER_CLASS_NAME, targetLevel, text, record.getThrown());
    }
View Full Code Here

Examples of org.apache.log4j.Priority

                pw.print(callFrame);
            }
            pw.close();
            String stackTrace = sw.getBuffer().toString();
            Level level = this.getLevel(traceLevel);
            Priority priority = this.getLogPriority();
            if ( level.isGreaterOrEqual(priority)) {
                logger.log(level,stackTrace);
            }

        }
View Full Code Here

Examples of org.apache.log4j.Priority

        public Priority getThreshold() {
            return TO_LOG4J.get(handler.getLevel());
        }
        @Override
        public boolean isAsSevereAsThreshold(Priority priority) {
            Priority p = getThreshold();
            return (p == null) || priority.isGreaterOrEqual(p);
        }       
View Full Code Here

Examples of org.apache.oodt.cas.workflow.structs.Priority

      wInst.setSharedContext(met);
    } else
      wInst.setSharedContext(new Metadata());

    if (workflowInstance.get("priority") != null) {
      Priority p = Priority.getPriority(Double
          .valueOf((String) workflowInstance.get("priority")));
    }

    return wInst;
  }
View Full Code Here

Examples of org.apache.webbeans.intercept.annotation.Priority

        if (targetIndex == -1)
        {
            throw new IllegalArgumentException(target.getName() + " is not an enabled interceptor!");
        }

        final Priority p1 = src.getAnnotation(Priority.class);
        final Priority p2 = target.getAnnotation(Priority.class);
        if (p1 != null && p2 != null)
        {
            return p1.value() - p2.value();
        }
        if (p1 == null && p2 != null)
        {
            return -1;
        }
View Full Code Here

Examples of org.axonframework.common.Priority

    private PriorityAnnotationComparator() {
    }

    @Override
    public int compare(T o1, T o2) {
        Priority annotation1 = o1.getClass().getAnnotation(Priority.class);
        Priority annotation2 = o2.getClass().getAnnotation(Priority.class);
        int prio1 = annotation1 == null ? Priority.NEUTRAL : annotation1.value();
        int prio2 = annotation2 == null ? Priority.NEUTRAL : annotation2.value();

        return (prio1 > prio2) ? -1 : ((prio2 == prio1) ? 0 : 1);
    }
View Full Code Here

Examples of org.eclipse.sisu.Priority

                if ( null != priority )
                {
                    return priority.value();
                }
            }
            final Priority priority = implementation.getAnnotation( Priority.class );
            if ( null != priority )
            {
                return priority.value();
            }
        }
        if ( QualifyingStrategy.DEFAULT_QUALIFIER.equals( QualifyingStrategy.qualify( binding.getKey() ) ) )
        {
            return primaryRank;
View Full Code Here

Examples of org.elasticsearch.common.Priority

        // will hold all the tasks in the order in which they were executed
        List<PrioritiezedTask> tasks = new ArrayList<>(taskCount);
        CountDownLatch latch = new CountDownLatch(taskCount);
        for (int i = 0; i < taskCount; i++) {
            Priority priority = priorities[randomIntBetween(0, priorities.length - 1)];
            clusterService.submitStateUpdateTask("test", priority, new PrioritiezedTask(priority, latch, tasks));
        }

        block.release();
        latch.await();

        Priority prevPriority = null;
        for (PrioritiezedTask task : tasks) {
            if (prevPriority == null) {
                prevPriority = task.priority;
            } else {
                assertThat(task.priority.sameOrAfter(prevPriority), is(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.