|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
°³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå |
java.lang.Objectjava.util.concurrent.atomic.AtomicIntegerFieldUpdater<T>
T
- °»½Å °¡´ÉÇÑ Çʵ带 º¸°ü À¯ÁöÇÏ´Â °´Ã¼ÀÇ ÇüÅÂpublic abstract class AtomicIntegerFieldUpdater<T>
ÁöÁ¤µÈ Ŭ·¡½ºÀÇ ÁöÁ¤µÈ volatile int ÇʵåÀÇ ¿øÀÚ °»½ÅÀÌ °¡´ÉÇÑ, ¸®Ç÷º¼Ç º£À̽ºÀÇ À¯Æ¿¸®Æ¼ÀÔ´Ï´Ù. ÀÌ Å¬·¡½º´Â µ¿ÀÏ ³ëµåÀÇ º¹¼ö Çʵ尡 µ¶¸³ÇØ ¿øÀÚ °»½ÅÀÇ ´ë»óÀÌ µÇ´Â ¿øÀÚ µ¥ÀÌÅÍ ±¸Á¶·Î »ç¿ëÇÏ´Â ¸ñÀûÀ¸·Î ¼³°èµÇ°í ÀÖ½À´Ï´Ù.
ÀÌ Å¬·¡½º³»ÀÇ compareAndSet ¸Þ¼µåÀÇ º¸ÁõÀº ´Ù¸¥ ¿øÀÚ Å¬·¡½º³»ÀÇ ±×°Íº¸´Ù ¾àÇÑ °Í¿¡ À¯ÀÇÇØ ÁÖ¼¼¿ä. ÀÌ Å¬·¡½º´Â ÇʵåÀÇ »ç¿ë ¸ðµç °ÍÀÌ ¿øÀÚ ¾×¼¼½º¿¡ ÀûÀýÇϰí ÀÖ´Â °ÍÀ» º¸ÁõÇÒ ¼ö ¾ø±â ¶§¹®¿¡ compareAndSet ¹× set ¿Ü È£Ãâ¿¡ °üÇÑ º¸°í ¿øÀÚ¼º ¹× Èֹ߼º ½Ã¸àƽ½º¸¦ º¸ÁõÇÒ ¼ö ÀÖ½À´Ï´Ù.
»ý¼ºÀÚ °³¿ä | |
---|---|
protected |
AtomicIntegerFieldUpdater ()
¼ºê Ŭ·¡½º¿¡ ÀÇÇØ »ç¿ëµÈ´Ù, ¾Æ¹«°Íµµ ½Ç½ÃÇÏÁö ¾Ê´Â protected constructor¡¡ ¡¡. |
¸Þ¼µå °³¿ä | ||
---|---|---|
int |
addAndGet (T obj,
int delta)
ÇöÀçÀÇ °ªÀ¸·Î ÁöÁ¤µÈ °ªÀ» ¿øÀÚÀûÀ¸·Î Ãß°¡ÇÕ´Ï´Ù. |
|
abstract boolean |
compareAndSet (T obj,
int expect,
int update)
¡¸ÇöÀçÀÇ °ª == ¿¹»óµÇ´Â °ª¡¹ÀÎ °æ¿ì, ÀÌ Updater°¡ °ü¸®ÇÏ´Â ÁöÁ¤µÈ °´Ã¼ÀÇ Çʵ尪À» ¿øÀÚÀûÀ¸·Î ¼³Á¤ÇÕ´Ï´Ù. |
|
int |
decrementAndGet (T obj)
ÇöÀçÀÇ °ªÀ» 1 ¸¸ ¿øÀÚÀûÀ¸·Î °¨ ºÐ ÇÕ´Ï´Ù. |
|
abstract int |
get (T obj)
ÁöÁ¤µÈ °´Ã¼°¡ º¸°ü À¯ÁöÇÏ´Â Çʵ峻ÀÇ ÇöÀç°¡¸¦ ÃëµæÇÕ´Ï´Ù. |
|
int |
getAndAdd (T obj,
int delta)
ÇöÀçÀÇ °ªÀ¸·Î ÁöÁ¤µÈ °ªÀ» ¿øÀÚÀûÀ¸·Î Ãß°¡ÇÕ´Ï´Ù. |
|
int |
getAndDecrement (T obj)
ÇöÀçÀÇ °ªÀ» 1 ¸¸ ¿øÀÚÀûÀ¸·Î °¨ ºÐ ÇÕ´Ï´Ù. |
|
int |
getAndIncrement (T obj)
ÇöÀçÀÇ °ªÀ» 1 ¸¸ ¿øÀÚÀûÀ¸·Î ÁõºÐ ÇÕ´Ï´Ù. |
|
int |
getAndSet (T obj,
int newValue)
ÁöÁ¤µÈ °ªÀ¸·Î ¼³Á¤ÇØ, ÀÌÀüÀÇ °ªÀ» ¸®ÅÏÇÕ´Ï´Ù. |
|
int |
incrementAndGet (T obj)
ÇöÀçÀÇ °ªÀ» 1 ¸¸ ¿øÀÚÀûÀ¸·Î ÁõºÐ ÇÕ´Ï´Ù. |
|
static
|
newUpdater (Class <U> tclass,
String fieldName)
ÁöÁ¤µÈ Çʵ带 °¡Áö´Â °´Ã¼ÀÇ ¾÷ µ¥ÀÌÅ͸¦ ÀÛ¼ºÇÕ´Ï´Ù. |
|
abstract void |
set (T obj,
int newValue)
ÀÌ ¾÷ µ¥ÀÌÅÍ¿¡ ÀÇÇØ °ü¸®µÇ´Â ÁöÁ¤µÈ °´Ã¼ÀÇ Çʵ带 ¼³Á¤ÇÕ´Ï´Ù. |
|
abstract boolean |
weakCompareAndSet (T obj,
int expect,
int update)
¡¸ÇöÀçÀÇ °ª == ¿¹»óµÇ´Â °ª¡¹ÀÎ °æ¿ì, ÀÌ Updater°¡ °ü¸®ÇÏ´Â ÁöÁ¤µÈ °´Ã¼ÀÇ Çʵ尪À» ¿øÀÚÀûÀ¸·Î ¼³Á¤ÇÕ´Ï´Ù. |
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼µå |
---|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
»ý¼ºÀÚ »ó¼¼ |
---|
protected AtomicIntegerFieldUpdater()
¸Þ¼µåÀÇ »ó¼¼ |
---|
public static <U> AtomicIntegerFieldUpdater <U> newUpdater(Class <U> tclass, String fieldName)
tclass
- Çʵ带 º¸°ü À¯ÁöÇÏ´Â °´Ã¼ÀÇ Å¬·¡½ºfieldName
- °»½ÅÇÏ´Â ÇʵåÀÇ À̸§
IllegalArgumentException
- Çʵ尡 Èֹ߼ºÀÇ Á¤¼öÇüÀÌ ¾Æ´Ñ °æ¿ì
RuntimeException
- Ŭ·¡½º¿¡ Çʵ尡 Æ÷ÇÔµÇÁö ¾Ê´Â°¡ ÇüŰ¡ ºÎÁ¤ÇÑ °æ¿ì¿¡
»óÀÚ·Î µÈ ¸®Ç÷º¼Ç º£À̽ºÀÇ ¿¹¿Ü°¡ Throw µÈ´Ùpublic abstract boolean compareAndSet(T obj, int expect, int update)
obj
- Á¶°ÇºÎ·Î Çʵ带 ¼³Á¤ÇÏ´Â °´Ã¼expect
- ¿¹»óµÇ´Â °ªupdate
- »õ·Î¿î °ª
ClassCastException
- obj°¡ »ý¼ºÀÚ³»¿¡¼ È®¸³µÈ Çʵ带 ó¸®Çϴ Ŭ·¡½ºÀÇ ÀνºÅϽº°¡ ¾Æ´Ñ °æ¿ìpublic abstract boolean weakCompareAndSet(T obj, int expect, int update)
obj
- Á¶°ÇºÎ·Î Çʵ带 ¼³Á¤ÇÏ´Â °´Ã¼expect
- ¿¹»óµÇ´Â °ªupdate
- »õ·Î¿î °ª
ClassCastException
- obj°¡ »ý¼ºÀÚ³»¿¡¼ È®¸³µÈ Çʵ带 ó¸®Çϴ Ŭ·¡½ºÀÇ ÀνºÅϽº°¡ ¾Æ´Ñ °æ¿ìpublic abstract void set(T obj, int newValue)
obj
- Çʵ带 ¼³Á¤ÇÏ´Â °´Ã¼newValue
- »õ·Î¿î °ªpublic abstract int get(T obj)
obj
- Çʵ带 ¾ò´Â °´Ã¼
public int getAndSet(T obj, int newValue)
obj
- Çʵ带 Ãëµæ ¹× ¼³Á¤ÇÏ´Â °´Ã¼newValue
- »õ·Î¿î °ª
public int getAndIncrement(T obj)
obj
- Çʵ带 Ãëµæ ¹× ¼³Á¤ÇÏ´Â °´Ã¼
public int getAndDecrement(T obj)
obj
- Çʵ带 Ãëµæ ¹× ¼³Á¤ÇÏ´Â °´Ã¼
public int getAndAdd(T obj, int delta)
obj
- Çʵ带 Ãëµæ ¹× ¼³Á¤ÇÏ´Â °´Ã¼delta
- Ãß°¡ÇÏ´Â °ª
public int incrementAndGet(T obj)
obj
- Çʵ带 Ãëµæ ¹× ¼³Á¤ÇÏ´Â °´Ã¼
public int decrementAndGet(T obj)
obj
- Çʵ带 Ãëµæ ¹× ¼³Á¤ÇÏ´Â °´Ã¼
public int addAndGet(T obj, int delta)
obj
- Çʵ带 Ãëµæ ¹× ¼³Á¤ÇÏ´Â °´Ã¼delta
- Ãß°¡ÇÏ´Â °ª
|
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 µµ ÂüÁ¶ÇϽʽÿÀ.