Package org.axonframework.common

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

TOP

Related Classes of org.axonframework.common.Priority

Copyright © 2018 www.massapicom. 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.