|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjava.lang.ThreadLocal <T>
java.lang.InheritableThreadLocal<T>
public class InheritableThreadLocal<T>
ÀÌ Å¬·¡½º´Â Ä£thread·ÎºÎÅÍÀÚ½Ä thread¿¡ÀÇ °ªÀÇ »ó¼ÓÀ» Á¦°øÇϱâ À§Çؼ ThreadLocal¸¦ È®ÀåÇÕ´Ï´Ù.ÀÚ½Ä threadÀÇ ÀÛ¼º½Ã¿¡ ÀڽĴ ºÎ¸ð°¡ °ªÀ» º¸°ü À¯ÁöÇÏ´Â »ó¼Ó °¡´ÉÇÑ thread ·ÎÄà º¯¼ö ¸ðµç ÃʱⰪÀ» ¹Þ½À´Ï´Ù. º¸Åë,ÀÚ½Ä ÀÇ °ªÀº ºÎ¸ðÀÇ °ª°ú °°½À´Ï´Ù. ±×·¯³ª, ÀÌ Å¬·¡½ºÀÇ childValue ¸Þ¼µå¸¦ ¿À¹ö¶óÀ̵å(override) Çϸé,ÀÚ½Ä ÀÇ °ªÀ» ºÎ¸ðÀÇ °ª¿¡ ´ëÇÑ ÀÓÀÇÀÇ ÇÔ¼ö·Î ÇÒ ¼ö ÀÖ½À´Ï´Ù.
º¯¼ö·Î¼ º¸°ü À¯ÁöµÇ´Â thread¸¶´ÙÀÇ ¼Ó¼º (»ç¿ëÀÚ ID, Æ®·£Àè¼Ç(transaction) ID µî)À» ÀÛ¼ºµÇ´Â ¸ðµçÀÚ½Ä thread¿¡ ÀÚµ¿ÀûÀ¸·Î Àü¼Û ÇÒ Çʿ䰡 ÀÖ´Â °æ¿ì¿¡´Â »ó¼Ó °¡´ÉÇÑ thread ·ÎÄà º¯¼ö°¡ º¸Åë ÀÇ thread ·ÎÄà º¯¼öº¸´Ù ¿ì¼±ÀûÀ¸·Î »ç¿ëµË´Ï´Ù.
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 |
»ý¼ºÀÚ »ó¼¼ |
---|
public InheritableThreadLocal()
¸Þ¼µåÀÇ »ó¼¼ |
---|
protected T childValue(T parentValue)
ÀÌ ¸Þ¼µå´Â ÀÔ·Â Àμö¸¦ µ¹·ÁÁÙ »ÓÀ̹ǷΠ´Ù¸¥ µ¿ÀÛÀÌ ÇÊ¿äÇÑ °æ¿ì¿¡´Â ¿À¹ö¶óÀ̵å(override)ÀÇÇØ ÁÖ¼¼¿ä.
parentValue
- ºÎ¸ðÀÇ threadÀÇ °ª
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.