@Override public int hashCode() { int ret = 13 * trace.length + state.hashCode(); for (StackTraceElement ste : trace) { ret ^= ste.hashCode(); } return ret; }
@Override public List<String> getCurrentProcesses() { List<String> processList = new ArrayList<String>(); for (String key : threadFactories.keySet()) { for (OseeServerThread thread : getThreadsFromFactory(key)) { State state = thread.getState(); if (!state.equals(State.TERMINATED)) { processList.add(thread.getName()); } } } for (String contexts : oseeHttpServlets.keySet()) { InternalOseeHttpServlet servlets = oseeHttpServlets.get(contexts); if (servlets.getState().equals(ProcessingStateEnum.BUSY)) { processList.add(servlets.getCurrentRequest()); } } return processList; }
public String toString(int traceLength) { StringBuilder ret = new StringBuilder("State: "); ret.append(state.name()); if (traceLength > 1) { ret.append("\n"); } else { ret.append(" "); } int i = 0; for (StackTraceElement ste : trace) { i++; if (i > traceLength) { break; } ret.append(ste.getClassName()); ret.append("#"); ret.append(ste.getMethodName()); ret.append(" (Line: "); ret.append(ste.getLineNumber()); ret.append(")\n"); } return ret.toString(); }
public boolean estiverCarregandoImagens() { State estado = thread != null ? thread.getState() : State.TERMINATED; return !estado.equals(State.TERMINATED); }