atomicmarkablereference.html
来自「j2se5-api-zh,java文档的中文版本」· HTML 代码 · 共 419 行 · 第 1/2 页
HTML
419 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_03) on Wed Nov 02 09:51:56 CST 2005 --><META http-equiv="Content-Type" content="text/html; charset=gb2312"><TITLE>AtomicMarkableReference (Java 2 Platform SE 5.0)</TITLE><META NAME="keywords" CONTENT="java.util.concurrent.atomic.AtomicMarkableReference class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="AtomicMarkableReference (Java 2 Platform SE 5.0)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="跳过导航链接"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>概述</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>类</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AtomicMarkableReference.html"><FONT CLASS="NavBarFont1"><B>使用</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>已过时</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Standard Ed. 5.0</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="AtomicLongFieldUpdater.html" title="java.util.concurrent.atomic 中的类"><B>上一个类</B></A> <A HREF="AtomicReference.html" title="java.util.concurrent.atomic 中的类"><B>下一个类</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html@java_2Futil_2Fconcurrent_2Fatomic_2FAtomicMarkableReference.html" target="_top"><B>框架</B></A> <A HREF="AtomicMarkableReference.html" target="_top"><B>无框架</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>所有类</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>所有类</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 摘要: 嵌套 | 字段 | <A HREF="#constructor_summary">构造方法</A> | <A HREF="#method_summary">方法</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">详细信息: 字段 | <A HREF="#constructor_detail">构造方法</A> | <A HREF="#method_detail">方法</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.util.concurrent.atomic</FONT><BR>类 AtomicMarkableReference<V></H2><PRE><A HREF="../../../lang/Object.html" title="java.lang 中的类">java.lang.Object</A> <IMG SRC="../../../../resources/inherit.gif" ALT="继承者 "><B>java.util.concurrent.atomic.AtomicMarkableReference<V></B></PRE><DL><DT><DT><B>类型参数:</B><DD><CODE>V</CODE> - 此引用所引用的对象类型</DL><HR><DL><DT><PRE>public class <B>AtomicMarkableReference<V></B><DT>extends <A HREF="../../../lang/Object.html" title="java.lang 中的类">Object</A></DL></PRE><P><tt>AtomicMarkableReference</tt> 维护带有标记位的对象引用,可以原子方式对其进行更新。 <p><p> 实现注意事项。通过创建表示“已装箱”的 [reference, boolean] 对的内部对象,此实现维持可标记的引用。<P><P><DL><DT><B>从以下版本开始:</B></DT> <DD>1.5</DD></DL><HR><P><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>构造方法摘要</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="AtomicMarkableReference.html#AtomicMarkableReference(V, boolean)">AtomicMarkableReference</A></B>(<A HREF="AtomicMarkableReference.html" title="AtomicMarkableReference 中的类型参数">V</A> initialRef, boolean initialMark)</CODE><BR> 使用给定的初始值创建新的 <tt>AtomicMarkableReference</tt>。</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>方法摘要</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="AtomicMarkableReference.html#attemptMark(V, boolean)">attemptMark</A></B>(<A HREF="AtomicMarkableReference.html" title="AtomicMarkableReference 中的类型参数">V</A> expectedReference, boolean newMark)</CODE><BR> 如果当前引用 <tt>==</tt> 预期引用,则以原子方式将该标记的值设置为给定的更新值。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="AtomicMarkableReference.html#compareAndSet(V, V, boolean, boolean)">compareAndSet</A></B>(<A HREF="AtomicMarkableReference.html" title="AtomicMarkableReference 中的类型参数">V</A> expectedReference, <A HREF="AtomicMarkableReference.html" title="AtomicMarkableReference 中的类型参数">V</A> newReference, boolean expectedMark, boolean newMark)</CODE><BR> 如果当前引用 <tt>==</tt> 预期引用,并且当前标记等于预期标记,那么以原子方式将引用和标记的值设置为给定的更新值。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="AtomicMarkableReference.html" title="AtomicMarkableReference 中的类型参数">V</A></CODE></FONT></TD><TD><CODE><B><A HREF="AtomicMarkableReference.html#get(boolean[])">get</A></B>(boolean[] markHolder)</CODE><BR> 返回该引用和该标记的当前值。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="AtomicMarkableReference.html" title="AtomicMarkableReference 中的类型参数">V</A></CODE></FONT></TD><TD><CODE><B><A HREF="AtomicMarkableReference.html#getReference()">getReference</A></B>()</CODE><BR> 返回该引用的当前值。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="AtomicMarkableReference.html#isMarked()">isMarked</A></B>()</CODE><BR> 返回该标记的当前值。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="AtomicMarkableReference.html#set(V, boolean)">set</A></B>(<A HREF="AtomicMarkableReference.html" title="AtomicMarkableReference 中的类型参数">V</A> newReference, boolean newMark)</CODE><BR> 无条件地同时设置该引用和标记的值。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="AtomicMarkableReference.html#weakCompareAndSet(V, V, boolean, boolean)">weakCompareAndSet</A></B>(<A HREF="AtomicMarkableReference.html" title="AtomicMarkableReference 中的类型参数">V</A> expectedReference, <A HREF="AtomicMarkableReference.html" title="AtomicMarkableReference 中的类型参数">V</A> newReference, boolean expectedMark, boolean newMark)</CODE><BR> 如果当前引用 <tt>==</tt> 预期引用,并且当前标记等于预期标记,那么以原子方式将引用和标记的值设置为给定的更新值。</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?