Java 类org.apache.catalina.tribes.membership.StaticMember 实例源码

项目:tomcat7    文件:TcpFailureDetector.java   
protected void performForcedCheck() {
    //update all alive times
    Member[] members = super.getMembers();
    for (int i = 0; members != null && i < members.length; i++) {
        if (memberAlive(members[i])) {
            if (membership.memberAlive((MemberImpl)members[i])) super.memberAdded(members[i]);
            addSuspects.remove(members[i]);
        } else {
            if (membership.getMember(members[i])!=null) {
                membership.removeMember((MemberImpl)members[i]);
                removeSuspects.remove(members[i]);
                if (members[i] instanceof StaticMember) {
                    addSuspects.put(members[i], Long.valueOf(System.currentTimeMillis()));
                }
                super.memberDisappeared(members[i]);
            }
        } //end if
    } //for

}
项目:apache-tomcat-7.0.73-with-comment    文件:TcpFailureDetector.java   
protected void performForcedCheck() {
    //update all alive times
    Member[] members = super.getMembers();
    for (int i = 0; members != null && i < members.length; i++) {
        if (memberAlive(members[i])) {
            if (membership.memberAlive((MemberImpl)members[i])) super.memberAdded(members[i]);
            addSuspects.remove(members[i]);
        } else {
            if (membership.getMember(members[i])!=null) {
                membership.removeMember((MemberImpl)members[i]);
                removeSuspects.remove(members[i]);
                if (members[i] instanceof StaticMember) {
                    addSuspects.put(members[i], Long.valueOf(System.currentTimeMillis()));
                }
                super.memberDisappeared(members[i]);
            }
        } //end if
    } //for

}
项目:lazycat    文件:TcpFailureDetector.java   
protected void performForcedCheck() {
    // update all alive times
    Member[] members = super.getMembers();
    for (int i = 0; members != null && i < members.length; i++) {
        if (memberAlive(members[i])) {
            if (membership.memberAlive((MemberImpl) members[i]))
                super.memberAdded(members[i]);
            addSuspects.remove(members[i]);
        } else {
            if (membership.getMember(members[i]) != null) {
                membership.removeMember((MemberImpl) members[i]);
                removeSuspects.remove(members[i]);
                if (members[i] instanceof StaticMember) {
                    addSuspects.put(members[i], Long.valueOf(System.currentTimeMillis()));
                }
                super.memberDisappeared(members[i]);
            }
        } // end if
    } // for

}
项目:class-guard    文件:TcpFailureDetector.java   
protected void performForcedCheck() {
    //update all alive times
    Member[] members = super.getMembers();
    for (int i = 0; members != null && i < members.length; i++) {
        if (memberAlive(members[i])) {
            if (membership.memberAlive((MemberImpl)members[i])) super.memberAdded(members[i]);
            addSuspects.remove(members[i]);
        } else {
            if (membership.getMember(members[i])!=null) {
                membership.removeMember((MemberImpl)members[i]);
                removeSuspects.remove(members[i]);
                if (members[i] instanceof StaticMember) {
                    addSuspects.put(members[i], Long.valueOf(System.currentTimeMillis()));
                }
                super.memberDisappeared(members[i]);
            }
        } //end if
    } //for

}
项目:apache-tomcat-7.0.57    文件:TcpFailureDetector.java   
protected void performForcedCheck() {
    //update all alive times
    Member[] members = super.getMembers();
    for (int i = 0; members != null && i < members.length; i++) {
        if (memberAlive(members[i])) {
            if (membership.memberAlive((MemberImpl)members[i])) super.memberAdded(members[i]);
            addSuspects.remove(members[i]);
        } else {
            if (membership.getMember(members[i])!=null) {
                membership.removeMember((MemberImpl)members[i]);
                removeSuspects.remove(members[i]);
                if (members[i] instanceof StaticMember) {
                    addSuspects.put(members[i], Long.valueOf(System.currentTimeMillis()));
                }
                super.memberDisappeared(members[i]);
            }
        } //end if
    } //for

}
项目:apache-tomcat-7.0.57    文件:TcpFailureDetector.java   
protected void performForcedCheck() {
    //update all alive times
    Member[] members = super.getMembers();
    for (int i = 0; members != null && i < members.length; i++) {
        if (memberAlive(members[i])) {
            if (membership.memberAlive((MemberImpl)members[i])) super.memberAdded(members[i]);
            addSuspects.remove(members[i]);
        } else {
            if (membership.getMember(members[i])!=null) {
                membership.removeMember((MemberImpl)members[i]);
                removeSuspects.remove(members[i]);
                if (members[i] instanceof StaticMember) {
                    addSuspects.put(members[i], Long.valueOf(System.currentTimeMillis()));
                }
                super.memberDisappeared(members[i]);
            }
        } //end if
    } //for

}
项目:class-guard    文件:TcpFailureDetector.java   
@Override
public void memberDisappeared(Member member) {
    if ( membership == null ) setupMembership();
    boolean notify = false;
    boolean shutdown = Arrays.equals(member.getCommand(),Member.SHUTDOWN_PAYLOAD);
    if ( !shutdown )
        if(log.isInfoEnabled())
            log.info("Received memberDisappeared["+member+"] message. Will verify.");
    synchronized (membership) {
        if (!membership.contains(member)) {
            if(log.isInfoEnabled())
                log.info("Verification complete. Member already disappeared["+member+"]");
            return;
        }
        //check to see if the member really is gone
        //if the payload is not a shutdown message
        if (shutdown || !memberAlive(member)) {
            //not correct, we need to maintain the map
            membership.removeMember( (MemberImpl) member);
            removeSuspects.remove(member);
            if (member instanceof StaticMember) {
                addSuspects.put(member, Long.valueOf(System.currentTimeMillis()));
            }
            notify = true;
        } else {
            //add the member as suspect
            removeSuspects.put(member, Long.valueOf(System.currentTimeMillis()));
        }
    }
    if ( notify ) {
        if(log.isInfoEnabled())
            log.info("Verification complete. Member disappeared["+member+"]");
        super.memberDisappeared(member);
    } else {
        if(log.isInfoEnabled())
            log.info("Verification complete. Member still alive["+member+"]");

    }
}
项目:apache-tomcat-7.0.57    文件:TcpFailureDetector.java   
@Override
public void memberDisappeared(Member member) {
    if ( membership == null ) setupMembership();
    boolean notify = false;
    boolean shutdown = Arrays.equals(member.getCommand(),Member.SHUTDOWN_PAYLOAD);
    if ( !shutdown )
        if(log.isInfoEnabled())
            log.info("Received memberDisappeared["+member+"] message. Will verify.");
    synchronized (membership) {
        if (!membership.contains(member)) {
            if(log.isInfoEnabled())
                log.info("Verification complete. Member already disappeared["+member+"]");
            return;
        }
        //check to see if the member really is gone
        //if the payload is not a shutdown message
        if (shutdown || !memberAlive(member)) {
            //not correct, we need to maintain the map
            membership.removeMember( (MemberImpl) member);
            removeSuspects.remove(member);
            if (member instanceof StaticMember) {
                addSuspects.put(member, Long.valueOf(System.currentTimeMillis()));
            }
            notify = true;
        } else {
            //add the member as suspect
            removeSuspects.put(member, Long.valueOf(System.currentTimeMillis()));
        }
    }
    if ( notify ) {
        if(log.isInfoEnabled())
            log.info("Verification complete. Member disappeared["+member+"]");
        super.memberDisappeared(member);
    } else {
        if(log.isInfoEnabled())
            log.info("Verification complete. Member still alive["+member+"]");

    }
}
项目:apache-tomcat-7.0.57    文件:TcpFailureDetector.java   
@Override
public void memberDisappeared(Member member) {
    if ( membership == null ) setupMembership();
    boolean notify = false;
    boolean shutdown = Arrays.equals(member.getCommand(),Member.SHUTDOWN_PAYLOAD);
    if ( !shutdown )
        if(log.isInfoEnabled())
            log.info("Received memberDisappeared["+member+"] message. Will verify.");
    synchronized (membership) {
        if (!membership.contains(member)) {
            if(log.isInfoEnabled())
                log.info("Verification complete. Member already disappeared["+member+"]");
            return;
        }
        //check to see if the member really is gone
        //if the payload is not a shutdown message
        if (shutdown || !memberAlive(member)) {
            //not correct, we need to maintain the map
            membership.removeMember( (MemberImpl) member);
            removeSuspects.remove(member);
            if (member instanceof StaticMember) {
                addSuspects.put(member, Long.valueOf(System.currentTimeMillis()));
            }
            notify = true;
        } else {
            //add the member as suspect
            removeSuspects.put(member, Long.valueOf(System.currentTimeMillis()));
        }
    }
    if ( notify ) {
        if(log.isInfoEnabled())
            log.info("Verification complete. Member disappeared["+member+"]");
        super.memberDisappeared(member);
    } else {
        if(log.isInfoEnabled())
            log.info("Verification complete. Member still alive["+member+"]");

    }
}
项目:tomcat7    文件:TcpFailureDetector.java   
@Override
public void memberDisappeared(Member member) {
    if ( membership == null ) setupMembership();
    boolean notify = false;
    boolean shutdown = Arrays.equals(member.getCommand(),Member.SHUTDOWN_PAYLOAD);
    if (shutdown) {
        synchronized (membership) {
            if (!membership.contains(member)) return;
            membership.removeMember( (MemberImpl) member);
            removeSuspects.remove(member);
            if (member instanceof StaticMember) {
                addSuspects.put(member, Long.valueOf(System.currentTimeMillis()));
            }
        }
        super.memberDisappeared(member);
    } else {
        if(log.isInfoEnabled())
            log.info("Received memberDisappeared["+member+"] message. Will verify.");
        synchronized (membership) {
            if (!membership.contains(member)) {
                if(log.isInfoEnabled())
                    log.info("Verification complete. Member already disappeared["+member+"]");
                return;
            }
            //check to see if the member really is gone
            if (!memberAlive(member)) {
                //not correct, we need to maintain the map
                membership.removeMember( (MemberImpl) member);
                removeSuspects.remove(member);
                if (member instanceof StaticMember) {
                    addSuspects.put(member, Long.valueOf(System.currentTimeMillis()));
                }
                notify = true;
            } else {
                //add the member as suspect
                removeSuspects.put(member, Long.valueOf(System.currentTimeMillis()));
            }
        }
        if ( notify ) {
            if(log.isInfoEnabled())
                log.info("Verification complete. Member disappeared["+member+"]");
            super.memberDisappeared(member);
        } else {
            if(log.isInfoEnabled()) 
                log.info("Verification complete. Member still alive["+member+"]");
        }
    }
}
项目:tomcat7    文件:StaticMembershipInterceptor.java   
public void setLocalMember(Member member) {
    this.localMember = member;
    ((StaticMember)localMember).setLocal(true);
}
项目:apache-tomcat-7.0.73-with-comment    文件:TcpFailureDetector.java   
@Override
public void memberDisappeared(Member member) {
    if ( membership == null ) setupMembership();
    boolean notify = false;
    boolean shutdown = Arrays.equals(member.getCommand(),Member.SHUTDOWN_PAYLOAD);
    if (shutdown) {
        synchronized (membership) {
            if (!membership.contains(member)) return;
            membership.removeMember( (MemberImpl) member);
            removeSuspects.remove(member);
            if (member instanceof StaticMember) {
                addSuspects.put(member, Long.valueOf(System.currentTimeMillis()));
            }
        }
        super.memberDisappeared(member);
    } else {
        if(log.isInfoEnabled())
            log.info("Received memberDisappeared["+member+"] message. Will verify.");
        synchronized (membership) {
            if (!membership.contains(member)) {
                if(log.isInfoEnabled())
                    log.info("Verification complete. Member already disappeared["+member+"]");
                return;
            }
            //check to see if the member really is gone
            if (!memberAlive(member)) {
                //not correct, we need to maintain the map
                membership.removeMember( (MemberImpl) member);
                removeSuspects.remove(member);
                if (member instanceof StaticMember) {
                    addSuspects.put(member, Long.valueOf(System.currentTimeMillis()));
                }
                notify = true;
            } else {
                //add the member as suspect
                removeSuspects.put(member, Long.valueOf(System.currentTimeMillis()));
            }
        }
        if ( notify ) {
            if(log.isInfoEnabled())
                log.info("Verification complete. Member disappeared["+member+"]");
            super.memberDisappeared(member);
        } else {
            if(log.isInfoEnabled()) 
                log.info("Verification complete. Member still alive["+member+"]");
        }
    }
}
项目:apache-tomcat-7.0.73-with-comment    文件:StaticMembershipInterceptor.java   
public void setLocalMember(Member member) {
    this.localMember = member;
    ((StaticMember)localMember).setLocal(true);
}
项目:lazycat    文件:TcpFailureDetector.java   
@Override
public void memberDisappeared(Member member) {
    if (membership == null)
        setupMembership();
    boolean notify = false;
    boolean shutdown = Arrays.equals(member.getCommand(), Member.SHUTDOWN_PAYLOAD);
    if (shutdown) {
        synchronized (membership) {
            if (!membership.contains(member))
                return;
            membership.removeMember((MemberImpl) member);
            removeSuspects.remove(member);
            if (member instanceof StaticMember) {
                addSuspects.put(member, Long.valueOf(System.currentTimeMillis()));
            }
        }
        super.memberDisappeared(member);
    } else {
        if (log.isInfoEnabled())
            log.info("Received memberDisappeared[" + member + "] message. Will verify.");
        synchronized (membership) {
            if (!membership.contains(member)) {
                if (log.isInfoEnabled())
                    log.info("Verification complete. Member already disappeared[" + member + "]");
                return;
            }
            // check to see if the member really is gone
            if (!memberAlive(member)) {
                // not correct, we need to maintain the map
                membership.removeMember((MemberImpl) member);
                removeSuspects.remove(member);
                if (member instanceof StaticMember) {
                    addSuspects.put(member, Long.valueOf(System.currentTimeMillis()));
                }
                notify = true;
            } else {
                // add the member as suspect
                removeSuspects.put(member, Long.valueOf(System.currentTimeMillis()));
            }
        }
        if (notify) {
            if (log.isInfoEnabled())
                log.info("Verification complete. Member disappeared[" + member + "]");
            super.memberDisappeared(member);
        } else {
            if (log.isInfoEnabled())
                log.info("Verification complete. Member still alive[" + member + "]");
        }
    }
}
项目:lazycat    文件:StaticMembershipInterceptor.java   
public void setLocalMember(Member member) {
    this.localMember = member;
    ((StaticMember) localMember).setLocal(true);
}
项目:wso2-axis2    文件:WkaMembershipService.java   
public void setPayload(byte[] payload) {
    this.payload = payload;
    ((StaticMember) membershipManager.getLocalMember()).setPayload(payload);
}
项目:wso2-axis2    文件:WkaMembershipService.java   
public void setDomain(byte[] domain) {
    this.domain = domain;
    ((StaticMember) membershipManager.getLocalMember()).setDomain(domain);
}