* @see java.lang.Exception#getMessage()
*/
public String getMessage() {
- StringBuffer buf = new StringBuffer(super.getMessage());
+ StringBuilder buf = new StringBuilder(super.getMessage());
if (faultyMembers==null || faultyMembers.size() == 0 ) {
buf.append("; No faulty members identified.");
} else {
}
public String toString() {
- StringBuffer buf = new StringBuffer("UniqueId");
+ StringBuilder buf = new StringBuilder("UniqueId");
buf.append(org.apache.catalina.tribes.util.Arrays.toString(id));
return buf.toString();
}
* @throws ChannelException
*/
protected void checkOptionFlags() throws ChannelException {
- StringBuffer conflicts = new StringBuffer();
+ StringBuilder conflicts = new StringBuilder();
ChannelInterceptor first = interceptors;
while ( first != null ) {
int flag = first.getOptionFlag();
}
protected static String bToS(byte[] data) {
- StringBuffer buf = new StringBuffer(4*16);
+ StringBuilder buf = new StringBuilder(4*16);
buf.append("{");
for (int i=0; data!=null && i<data.length; i++ ) buf.append(String.valueOf(data[i])).append(" ");
buf.append("}");
}
public String toString() {
- StringBuffer buf = new StringBuffer("RpcMessage[");
+ StringBuilder buf = new StringBuilder("RpcMessage[");
buf.append(super.toString());
buf.append("] rpcId=");
buf.append(Arrays.toString(rpcId));
}
public String toString() {
- StringBuffer buf = new StringBuffer("CoordinationEvent[type=");
+ StringBuilder buf = new StringBuilder("CoordinationEvent[type=");
buf.append(type).append("\n\tLocal:");
Member local = interceptor.getLocalMember(false);
buf.append(local!=null?local.getName():"").append("\n\tCoord:");
}
public void report(double timeTx) {
- StringBuffer buf = new StringBuffer("ThroughputInterceptor Report[\n\tTx Msg:");
+ StringBuilder buf = new StringBuilder("ThroughputInterceptor Report[\n\tTx Msg:");
buf.append(msgTxCnt).append(" messages\n\tSent:");
buf.append(df.format(mbTx));
buf.append(" MB (total)\n\tSent:");
}
public String toString() {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append("ClusterData[src=");
buf.append(getAddress()).append("; id=");
buf.append(bToS(getUniqueId())).append("; sent=");
}
public static String bToS(byte[] data) {
- StringBuffer buf = new StringBuffer(4*16);
+ StringBuilder buf = new StringBuilder(4*16);
buf.append("{");
for (int i=0; data!=null && i<data.length; i++ ) buf.append(String.valueOf(data[i])).append(" ");
buf.append("}");
* String representation of this object
*/
public String toString() {
- StringBuffer buf = new StringBuffer("org.apache.catalina.tribes.membership.MemberImpl[");
+ StringBuilder buf = new StringBuilder("org.apache.catalina.tribes.membership.MemberImpl[");
buf.append(getName()).append(",");
buf.append(getHostname()).append(",");
buf.append(port).append(", alive=");
return bToS(data,data.length);
}
public static String bToS(byte[] data, int max) {
- StringBuffer buf = new StringBuffer(4*16);
+ StringBuilder buf = new StringBuilder(4*16);
buf.append("{");
for (int i=0; data!=null && i<data.length; i++ ) {
buf.append(String.valueOf(data[i])).append(" ");
}
public String toString() {
- StringBuffer buf = new StringBuffer("MapEntry[key:");
+ StringBuilder buf = new StringBuilder("MapEntry[key:");
buf.append(getKey()).append("; ");
buf.append("value:").append(getValue()).append("; ");
buf.append("primary:").append(isPrimary()).append("; ");
private Member primary;
public String toString() {
- StringBuffer buf = new StringBuffer("MapMessage[context=");
+ StringBuilder buf = new StringBuilder("MapMessage[context=");
buf.append(new String(mapId));
buf.append("; type=");
buf.append(getTypeDesc());
* Name of this SockerSender
*/
public String toString() {
- StringBuffer buf = new StringBuffer("DataSender[(");
+ StringBuilder buf = new StringBuilder("DataSender[(");
buf.append(super.toString()).append(")");
buf.append(getAddress()).append(":").append(getPort()).append("]");
return buf.toString();
}
public static String toString(byte[] data, int offset, int length, boolean asInt) {
- StringBuffer buf = new StringBuffer("{");
+ StringBuilder buf = new StringBuilder("{");
if ( data != null && length > 0 ) {
if (asInt) buf.append((int)data[offset++]);
else buf.append(data[offset++]);
}
public static String toString(Object[] data, int offset, int length) {
- StringBuffer buf = new StringBuffer("{");
+ StringBuilder buf = new StringBuilder("{");
if ( data != null && length > 0 ) {
buf.append(data[offset++]);
for (int i = offset; i < length; i++) {
}
public static String toNameString(Member[] data, int offset, int length) {
- StringBuffer buf = new StringBuffer("{");
+ StringBuilder buf = new StringBuilder("{");
if ( data != null && length > 0 ) {
buf.append(data[offset++].getName());
for (int i = offset; i < length; i++) {
iString = MessageFormat.format(value, nonNullArgs);
} catch (IllegalArgumentException iae) {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append(value);
for (int i = 0; i < args.length; i++) {
buf.append(" arg[" + i + "]=" + args[i]);