Package org.axonframework.eventhandling

Examples of org.axonframework.eventhandling.ClassNamePatternClusterSelector


        // to make sure Listeners are assigned to their respective cluster, we create a number of selectors that we
        // combine into a single ClusterSelector using a CompositeClusterSelector
        ClusterSelector clusterSelector = new CompositeClusterSelector(Arrays.<ClusterSelector>asList(
                // this one will accept
                new ClassNamePatternClusterSelector(Pattern.compile(".*Another.*"), asyncCluster),
                new DefaultClusterSelector(standardCluster)
        ));

        // create the event bus and subscribe two listeners
        // notice how the registration process itself is unaware of clustering
View Full Code Here


    @Test
    public void testMatchesPattern() throws Exception {
        Cluster cluster = mock(Cluster.class);
        Pattern pattern = Pattern.compile("org\\.axonframework.*\\$1");
        ClassNamePatternClusterSelector testSubject = new ClassNamePatternClusterSelector(pattern, cluster);

        Cluster actual = testSubject.selectCluster(new EventListener() {
            @Override
            public void handle(EventMessage event) {
            }
        });
        assertSame(cluster, actual);
View Full Code Here

TOP

Related Classes of org.axonframework.eventhandling.ClassNamePatternClusterSelector

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.