private String getTabTitle(MemoryLogModel memoryLogModel) { SessionID sessionId = memoryLogModel.getSessionId(); if (sessionId == null) { return NO_SESSION_ID; } else { return sessionId.toString(); } }
private String getLogSuffix(SessionID sessionID, IoSession protocolSession) { String suffix = ":"; if (sessionID != null) { suffix += "sessionID=" + sessionID.toString() + ";"; } if (protocolSession != null) { suffix += "address=" + protocolSession.getRemoteAddress(); } return suffix; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (eventCategory == null ? 0 : eventCategory.hashCode()); result = prime * result + (sessionID == null ? 0 : sessionID.hashCode()); result = prime * result + (message == null ? 1231 : 1237); return result; }
public boolean equals(Object object) { if (object == null) { return false; } if (object instanceof Pair == false) { return false; } Pair pair = (Pair) object; return clOrdID.equals(pair.clOrdID) && sessionID.equals(pair.sessionID); }
public Pair(ClOrdID clOrdID, SessionID sessionID) { this.clOrdID = clOrdID; this.sessionID = sessionID; hashCode = ("C:" + clOrdID.toString() + "S:" + sessionID.toString()).hashCode(); }