Java Code Examples for org.jgroups.Event#CONNECT_USE_FLUSH

The following examples show how to use org.jgroups.Event#CONNECT_USE_FLUSH . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ELECTION.java    From jgroups-raft with Apache License 2.0 6 votes vote down vote up
public Object down(Event evt) {
    switch(evt.getType()) {
        case Event.CONNECT:
        case Event.CONNECT_USE_FLUSH:
        case Event.CONNECT_WITH_STATE_TRANSFER:
        case Event.CONNECT_WITH_STATE_TRANSFER_USE_FLUSH:
            Object retval=down_prot.down(evt); // connect first
            startElectionTimer();
            return retval;
        case Event.DISCONNECT:
            changeRole(Role.Follower);
            stopElectionTimer();
            break;
        case Event.SET_LOCAL_ADDRESS:
            local_addr=evt.getArg();
            break;
    }
    return down_prot.down(evt);
}
 
Example 2
Source File: OpenshiftPing.java    From openshift-ping with Apache License 2.0 5 votes vote down vote up
public Object down(Event evt) {
    switch (evt.getType()) {
    case Event.CONNECT:
    case Event.CONNECT_WITH_STATE_TRANSFER:
    case Event.CONNECT_USE_FLUSH:
    case Event.CONNECT_WITH_STATE_TRANSFER_USE_FLUSH:
        clusterName = (String) evt.getArg();
        break;
    }
    return super.down(evt);
}