ariba.util.core
Class ThreadNameAbbreviation

java.lang.Object
  extended by ariba.util.core.ThreadNameAbbreviation

public class ThreadNameAbbreviation
extends java.lang.Object

Maintain short names for threads. The short names are abbreviations used in the log to name threads. For Hashthreads, the short name is stored in a field of the Hashthread. Names for other threads are kept in a table indexed by the thread's hash code. The first time a short name is requested, it is returned as "=". This assumes that the hashcodes of different threads are unlikely to be the same. Perhaps we should also check the name when using the hashcode. We should periodically clean out the table.


Constructor Summary
ThreadNameAbbreviation()
           
 
Method Summary
static java.lang.String getName()
          Return the short name of the current thread.
static java.lang.String getName(java.lang.Thread thread)
          Return the short name of the given thread.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadNameAbbreviation

public ThreadNameAbbreviation()
Method Detail

getName

public static java.lang.String getName()
Return the short name of the current thread.


getName

public static java.lang.String getName(java.lang.Thread thread)
Return the short name of the given thread. For hashthreads, the short name is stored in a field on the hashthread. Names for other threads are kept in a table indexed by the thread's hash code. The first time a short name is requested, it is returned as "=".



AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.