@@ -0,0 +1,2213 @@
+/*%0A * Copyright (c) 2010-2017. Axon Framework%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.axonframework.springcloud.commandhandling;%0A%0Aimport java.util.function.Predicate;%0A%0Aimport org.axonframework.commandhandling.CommandMessage;%0Aimport org.axonframework.commandhandling.distributed.Member;%0A%0A/**%0A * A service interface to update a nodes local %7B@link org.axonframework.springcloud.commandhandling.MembershipInformation%7D,%0A * request it's local membership information from and to request remote membership information from.%0A */%0Apublic interface MembershipService %7B%0A%0A    /**%0A     * Update the %7B@link MembershipInformation%7D for this node.%0A     *%0A     * @param loadFactor    The load factor for this node as a int%0A     * @param commandFilter A %7B@link Predicate%7D containing the %7B@link org.axonframework.commandhandling.CommandMessage%7Ds%0A     *                      this node can handle%0A     */%0A    void updateMembership(int loadFactor, Predicate%3C? super CommandMessage%3C?%3E%3E commandFilter);%0A%0A%0A    /**%0A     * Get the %7B@link org.axonframework.springcloud.commandhandling.MembershipInformation%7D of this node.%0A     *%0A     * @return the MembershipInformation of this node%0A     */%0A    MembershipInformation getLocalMembershipInformation();%0A%0A    /**%0A     * Get the %7B@link MembershipInformation%7D of another member designated by the %7B@code remoteMember%7D.%0A     *%0A     * @param remoteMember a %7B@link Member%7D to retrieve the %7B@link org.axonframework.springcloud.commandhandling.MembershipInformation%7D%0A     *                     from.%0A     * @return the MembershipInformation of the node reference through remoteMember%0A     */%0A    MembershipInformation getRemoteMembershipInformation(Member remoteMember);%0A%0A%7D%0A

Introduce a MembershipService interface