JavaTM 2 Platform
Standard Ed. 5.0

java.lang
Ŭ·¡½º InheritableThreadLocal<T>

java.lang.Object 
  »óÀ§¸¦ È®Àå java.lang.ThreadLocal <T>
      »óÀ§¸¦ È®Àå java.lang.InheritableThreadLocal<T>

public class InheritableThreadLocal<T>
extends ThreadLocal <T>

ÀÌ Å¬·¡½º´Â Ä£thread·ÎºÎÅÍÀÚ½Ä thread¿¡ÀÇ °ªÀÇ »ó¼ÓÀ» Á¦°øÇϱâ À§Çؼ­ ThreadLocal¸¦ È®ÀåÇÕ´Ï´Ù.ÀÚ½Ä threadÀÇ ÀÛ¼º½Ã¿¡ ÀڽĴ ºÎ¸ð°¡ °ªÀ» º¸°ü À¯ÁöÇÏ´Â »ó¼Ó °¡´ÉÇÑ thread ·ÎÄà º¯¼ö ¸ðµç ÃʱⰪÀ» ¹Þ½À´Ï´Ù. º¸Åë,ÀÚ½Ä ÀÇ °ªÀº ºÎ¸ðÀÇ °ª°ú °°½À´Ï´Ù. ±×·¯³ª, ÀÌ Å¬·¡½ºÀÇ childValue ¸Þ¼­µå¸¦ ¿À¹ö¶óÀ̵å(override) Çϸé,ÀÚ½Ä ÀÇ °ªÀ» ºÎ¸ðÀÇ °ª¿¡ ´ëÇÑ ÀÓÀÇÀÇ ÇÔ¼ö·Î ÇÒ ¼ö ÀÖ½À´Ï´Ù.

º¯¼ö·Î¼­ º¸°ü À¯ÁöµÇ´Â thread¸¶´ÙÀÇ ¼Ó¼º (»ç¿ëÀÚ ID, Æ®·£Àè¼Ç(transaction) ID µî)À» ÀÛ¼ºµÇ´Â ¸ðµçÀÚ½Ä thread¿¡ ÀÚµ¿ÀûÀ¸·Î Àü¼Û ÇÒ ÇÊ¿ä°¡ ÀÖ´Â °æ¿ì¿¡´Â »ó¼Ó °¡´ÉÇÑ thread ·ÎÄà º¯¼ö°¡ º¸Åë ÀÇ thread ·ÎÄà º¯¼öº¸´Ù ¿ì¼±ÀûÀ¸·Î »ç¿ëµË´Ï´Ù.

µµÀÔµÈ ¹öÀü :
1.2
°ü·Ã Ç׸ñ:
ThreadLocal

»ý¼ºÀÚ °³¿ä
InheritableThreadLocal ()
           
 
¸Þ¼­µå °³¿ä
protected  T childValue (T  parentValue)
          ÀÌ »ó¼Ó °¡´ÉÇÑ thread ·ÎÄà º¯¼öÀÇ ÃʱⰪÀ»,ÀÚ½Ä threadÀÇ ÀÛ¼º½Ã¿¡ ºÎ¸ðÀÇ °ª¿¡ ´ëÇÑ ÇÔ¼ö·Î¼­ °è»êÇÕ´Ï´Ù.
 
Ŭ·¡½º java.lang. ThreadLocal ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
get, initialValue, remove, set
 
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

»ý¼ºÀÚ »ó¼¼

InheritableThreadLocal

public InheritableThreadLocal()
¸Þ¼­µåÀÇ »ó¼¼

childValue

protected T  childValue(T  parentValue)
ÀÌ »ó¼Ó °¡´ÉÇÑ thread ·ÎÄà º¯¼öÀÇ ÃʱⰪÀ»,ÀÚ½Ä threadÀÇ ÀÛ¼º½Ã¿¡ ºÎ¸ðÀÇ °ª¿¡ ´ëÇÑ ÇÔ¼ö·Î¼­ °è»êÇÕ´Ï´Ù. ÀÌ ¸Þ¼­µå´Â ÀÚ½ÄÀÌ °³½ÃµÇ±â Àü¿¡ Ä£threadÁß¿¡¼­ È£ÃâÇÕ´Ï´Ù.

ÀÌ ¸Þ¼­µå´Â ÀÔ·Â Àμö¸¦ µ¹·ÁÁÙ »ÓÀ̹ǷΠ´Ù¸¥ µ¿ÀÛÀÌ ÇÊ¿äÇÑ °æ¿ì¿¡´Â ¿À¹ö¶óÀ̵å(override)ÀÇÇØ ÁÖ¼¼¿ä.

ÆĶó¹ÌÅÍ:
parentValue - ºÎ¸ðÀÇ threadÀÇ °ª
¹Ýȯ°ª:
ÀÚÀÇ threadÀÇ ÃʱⰪ

JavaTM 2 Platform
Standard Ed. 5.0

Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.