public static <T> boolean different(T one,T two) { return !match(one,two); }
public synchronized boolean matchMergeId(MergeId id) {return Util.match(this.merge_id, id);}
public void setAddress(String address) { boolean changed=false; if(!Util.match(this.address, address)) changed=true; super.setAddress(address); if(changed) renameThreads(); }
public void setClusterName(String cluster_name) { boolean changed=false; if(!Util.match(this.clusterName, cluster_name)) changed=true; super.setClusterName(cluster_name); if(changed) renameThreads(); }
if(asym_encrypt != null) { String sym_alg=asym_encrypt.symAlgorithm(); if(!Util.match(sym_alg, secret_key_algorithm)) { log.warn("overriding %s=%s to %s from %s", "secret_key_algorithm", secret_key_algorithm, sym_alg, ASYM_ENCRYPT.class.getSimpleName());
public void init() throws Exception { super.init(); if(secret_key_length % 8 != 0) throw new IllegalStateException(String.format("secret_key_length (%d) must be a multiple of 8", secret_key_length)); ASYM_ENCRYPT asym_encrypt=findProtocolAbove(ASYM_ENCRYPT.class); if(asym_encrypt != null) { String sym_alg=asym_encrypt.symAlgorithm(); int sym_keylen=asym_encrypt.symKeylength(); if(Util.match(sym_alg, secret_key_algorithm)) { log.warn("overriding %s=%s to %s from %s", "secret_key_algorithm", secret_key_algorithm, sym_alg, ASYM_ENCRYPT.class.getSimpleName()); secret_key_algorithm=sym_alg; } if(sym_keylen != secret_key_length) { log.warn("overriding %s=%d to %d from %s", "secret_key_length", secret_key_length, sym_keylen, ASYM_ENCRYPT.class.getSimpleName()); secret_key_length=sym_keylen; } } key_agreement=KeyAgreement.getInstance("DH"); }
public void run() { while(running) { Message msg=null; try { if((msg=queue.take()) == null) // block until first message is available continue; long size=msg.size(); if(count + size >= transport.getMaxBundleSize()) { num_sends_because_full_queue++; fill_count.add(count); _sendBundledMessages(); } for(;;) { Address dest=msg.dest(); if(!Util.match(dest, target_dest) || count + size >= transport.getMaxBundleSize()) _sendBundledMessages(); _addMessage(msg, size); msg=queue.poll(); if(msg == null) break; size=msg.size(); } _sendBundledMessages(); } catch(Throwable t) { } } }
public synchronized boolean setMergeId(MergeId expected, MergeId new_value) { boolean match=Util.match(this.merge_id, expected); if(match) { if(new_value != null && merge_id_history.contains(new_value)) return false; else merge_id_history.add(new_value); this.merge_id=new_value; if(this.merge_id != null) { // Clears the view handler queue and discards all JOIN/LEAVE/MERGE requests until after the MERGE gms.getViewHandler().suspend(); gms.getDownProtocol().down(new Event(Event.SUSPEND_STABLE, 20000)); startMergeKiller(); } } return match; }
public static <T> boolean different(T one,T two) { return !match(one,two); }
public synchronized boolean matchMergeId(MergeId id) {return Util.match(this.merge_id, id);}
public void setClusterName(String cluster_name) { boolean changed=false; if(!Util.match(this.clusterName, cluster_name)) changed=true; super.setClusterName(cluster_name); if(changed) renameThreads(); }
public void setAddress(String address) { boolean changed=false; if(!Util.match(this.address, address)) changed=true; super.setAddress(address); if(changed) renameThreads(); }
if(asym_encrypt != null) { String sym_alg=asym_encrypt.symAlgorithm(); if(!Util.match(sym_alg, secret_key_algorithm)) { log.warn("overriding %s=%s to %s from %s", "secret_key_algorithm", secret_key_algorithm, sym_alg, ASYM_ENCRYPT.class.getSimpleName());
public void init() throws Exception { super.init(); if(secret_key_length % 8 != 0) throw new IllegalStateException(String.format("secret_key_length (%d) must be a multiple of 8", secret_key_length)); ASYM_ENCRYPT asym_encrypt=findProtocolAbove(ASYM_ENCRYPT.class); if(asym_encrypt != null) { String sym_alg=asym_encrypt.symAlgorithm(); int sym_keylen=asym_encrypt.symKeylength(); if(Util.match(sym_alg, secret_key_algorithm)) { log.warn("overriding %s=%s to %s from %s", "secret_key_algorithm", secret_key_algorithm, sym_alg, ASYM_ENCRYPT.class.getSimpleName()); secret_key_algorithm=sym_alg; } if(sym_keylen != secret_key_length) { log.warn("overriding %s=%d to %d from %s", "secret_key_length", secret_key_length, sym_keylen, ASYM_ENCRYPT.class.getSimpleName()); secret_key_length=sym_keylen; } } key_agreement=KeyAgreement.getInstance("DH"); }
public void run() { while(running) { Message msg=null; try { if((msg=queue.take()) == null) // block until first message is available continue; long size=msg.size(); if(count + size >= transport.getMaxBundleSize()) { num_sends_because_full_queue++; fill_count.add(count); _sendBundledMessages(); } for(;;) { Address dest=msg.dest(); if(!Util.match(dest, target_dest) || count + size >= transport.getMaxBundleSize()) _sendBundledMessages(); _addMessage(msg, size); msg=queue.poll(); if(msg == null) break; size=msg.size(); } _sendBundledMessages(); } catch(Throwable t) { } } }
public synchronized boolean setMergeId(MergeId expected, MergeId new_value) { boolean match=Util.match(this.merge_id, expected); if(match) { if(new_value != null && merge_id_history.contains(new_value)) return false; else merge_id_history.add(new_value); this.merge_id=new_value; if(this.merge_id != null) { // Clears the view handler queue and discards all JOIN/LEAVE/MERGE requests until after the MERGE gms.getViewHandler().suspend(); gms.getDownProtocol().down(new Event(Event.SUSPEND_STABLE, 20000)); startMergeKiller(); } } return match; }