Package java.lang.Thread

Examples of java.lang.Thread.State


The current status of the thread; one of the following values:
   
    */
    try {
      State state = ct.getState();
      if(State.NEW.equals(state)) return "NOT_STARTED";
      if(State.WAITING.equals(state)) return "WAITING";
      if(State.TERMINATED.equals(state)) {
        if(ct.terminated || ct.catchBlock!=null)return "TERMINATED";
        return "COMPLETED";
View Full Code Here


    }

    // Finally, try to terminate the thread.
    tryToTerminate(t);

    State s = t.getState();
    String message =
        msg +
        (s != State.TERMINATED ? " (and NOT TERMINATED, left in state " + s  + ")": " (and terminated)") +
        ": " + t.toString() +
        " (stack trace is a snapshot location of the thread at the moment of killing, " +
View Full Code Here

    }

    // Finally, try to terminate the thread.
    tryToTerminate(t);

    State s = t.getState();
    String message =
        msg +
        (s != State.TERMINATED ? " (and NOT TERMINATED, left in state " + s  + ")": " (and terminated)") +
        ": " + t.toString() +
        " (stack trace is a snapshot location of the thread at the moment of killing, " +
View Full Code Here

    }

    // Finally, try to terminate the thread.
    tryToTerminate(t);

    State s = t.getState();
    String message =
        msg +
        (s != State.TERMINATED ? " (and NOT TERMINATED, left in state " + s  + ")": " (and terminated)") +
        ": " + t.toString() +
        " (stack trace is a snapshot location of the thread at the moment of killing, " +
View Full Code Here

        final long[] allThreadIds = threads.getAllThreadIds();
        final ThreadInfo[] allThreads = threads.getThreadInfo(allThreadIds);
        int liveCount = 0;
        for (ThreadInfo info : allThreads) {
            if (info != null) {
                final State state = info.getThreadState();
                conditions.put(state, conditions.get(state) + 1);
                liveCount++;
            }
        }
        for (State state : new ArrayList<State>(conditions.keySet())) {
View Full Code Here

    }

    // Finally, try to terminate the thread.
    tryToTerminate(t);

    State s = t.getState();
    String message =
        msg +
        (s != State.TERMINATED ? " (and NOT TERMINATED, left in state " + s  + ")": " (and terminated)") +
        ": " + t.toString() +
        " (stack trace is a snapshot location of the thread at the moment of killing, " +
View Full Code Here

      logger.severe("No context information for this thread?: " + t);
    }

    tryToTerminate(t);

    State s = t.getState();
    String message =
        msg +
        (s != State.TERMINATED ? " (and NOT TERMINATED, left in state " + s  + ")": " (and terminated)") +
        ": " + t.toString() +
        " (stack trace is a snapshot location).";
View Full Code Here

TOP

Related Classes of java.lang.Thread.State

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.