@Override protected void onRelaunching(CoherenceClusterMember member, OptionsByType optionsByType) { // get the current MemberUID and record it (or make the application remember it) UID memberUID = member.getLocalMemberUID(); // add the member as a decoration to the OptionsByType optionsByType.add(Decoration.of(memberUID)); // notify the assembly of the change onChanged(optionsByType); }
@Override protected void onRelaunching(CoherenceClusterMember member, OptionsByType optionsByType) { // get the current MemberUID and record it (or make the application remember it) UID memberUID = member.getLocalMemberUID(); // add the member as a decoration to the OptionsByType optionsByType.add(Decoration.of(memberUID)); // notify the assembly of the change onChanged(optionsByType); }
@Override protected void onRelaunching(CoherenceClusterMember member, OptionsByType optionsByType) { // get the current MemberUID and record it (or make the application remember it) UID memberUID = member.getLocalMemberUID(); // add the member as a decoration to the OptionsByType optionsByType.add(Decoration.of(memberUID)); // notify the assembly of the change onChanged(optionsByType); }
@Override protected void onRelaunched(CoherenceClusterMember original, CoherenceClusterMember restarted, OptionsByType optionsByType) { // ensure that the original member UID is no longer in the cluster Decorations decorations = optionsByType.get(Decorations.class); UID originalMemberUID = decorations.get(UID.class); if (originalMemberUID != null) { // ensure that the restarted member is in the member set of the cluster ensure(eventually(invoking(this).getClusterMemberUIDs()), doesNotContain(originalMemberUID)); } // ensure the restarted member has joined the cluster // (without doing this the local member id returned below may be different from // the one when the member joins the cluster) ensure(eventually(invoking(restarted).getClusterSize()), greaterThan(1)); // determine the UID of the restarted member UID restartedMemberUID = restarted.getLocalMemberUID(); // ensure that the restarted member is in the member set of the cluster ensure(eventually(invoking(this).getClusterMemberUIDs()), contains(restartedMemberUID)); // notify the assembly of the change onChanged(optionsByType); }
@Override protected void onRelaunched(CoherenceClusterMember original, CoherenceClusterMember restarted, OptionsByType optionsByType) { // ensure that the original member UID is no longer in the cluster Decorations decorations = optionsByType.get(Decorations.class); UID originalMemberUID = decorations.get(UID.class); if (originalMemberUID != null) { // ensure that the restarted member is in the member set of the cluster ensure(eventually(invoking(this).getClusterMemberUIDs()), doesNotContain(originalMemberUID)); } // ensure the restarted member has joined the cluster // (without doing this the local member id returned below may be different from // the one when the member joins the cluster) ensure(eventually(invoking(restarted).getClusterSize()), greaterThan(1)); // determine the UID of the restarted member UID restartedMemberUID = restarted.getLocalMemberUID(); // ensure that the restarted member is in the member set of the cluster ensure(eventually(invoking(this).getClusterMemberUIDs()), contains(restartedMemberUID)); // notify the assembly of the change onChanged(optionsByType); }
@Override protected void onRelaunched(CoherenceClusterMember original, CoherenceClusterMember restarted, OptionsByType optionsByType) { // ensure that the original member UID is no longer in the cluster Decorations decorations = optionsByType.get(Decorations.class); UID originalMemberUID = decorations.get(UID.class); if (originalMemberUID != null) { // ensure that the restarted member is in the member set of the cluster ensure(eventually(invoking(this).getClusterMemberUIDs()), doesNotContain(originalMemberUID)); } // ensure the restarted member has joined the cluster // (without doing this the local member id returned below may be different from // the one when the member joins the cluster) ensure(eventually(invoking(restarted).getClusterSize()), greaterThan(1)); // determine the UID of the restarted member UID restartedMemberUID = restarted.getLocalMemberUID(); // ensure that the restarted member is in the member set of the cluster ensure(eventually(invoking(this).getClusterMemberUIDs()), contains(restartedMemberUID)); // notify the assembly of the change onChanged(optionsByType); }