Class TestWorkspace

  • All Implemented Interfaces:
    java.lang.Runnable

    public class TestWorkspace
    extends java.lang.Thread
    This object implements a thread that obtains read permission to a workspace three times sequentially, then obtains write permission. To use it, create an instance and then call its start() method. To obtain a profile of what it did, call its profile() method. That will return only after the thread completes. NOTE: This is a very primitive test. It does not check very much.
    Since:
    Ptolemy II 0.2
    Version:
    $Id$
    Author:
    Edward A. Lee
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Green (eal)
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Constructor Summary

      Constructors 
      Constructor Description
      TestWorkspace​(java.lang.String name, Workspace workspace)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)  
      java.lang.String profile()  
      void run()  
      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TestWorkspace

        public TestWorkspace​(java.lang.String name,
                             Workspace workspace)
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.lang.Thread
      • profile

        public java.lang.String profile()