⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 abstractownablesynchronizer.java

📁 java1.6众多例子参考
💻 JAVA
字号:
/* * @(#)AbstractOwnableSynchronizer.java	1.2 05/11/17 * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package java.util.concurrent.locks;/** * A synchronizer that may be exclusively owned by a thread.  This * class provides a basis for creating locks and related synchronizers * that may entail a notion of ownership.  The * <tt>AbstractOwnableSynchronizer</tt> class itself does not manage or * use this information. However, subclasses and tools may use * appropriately maintained values to help control and monitor access * and provide diagnostics. * * @since 1.6 * @author Doug Lea */public abstract class AbstractOwnableSynchronizer    implements java.io.Serializable {    /** Use serial ID even though all fields transient. */    private static final long serialVersionUID = 3737899427754241961L;    /**     * Empty constructor for use by subclasses.     */    protected AbstractOwnableSynchronizer() { }    /**     * The current owner of exclusive mode synchronization.     */    private transient Thread exclusiveOwnerThread;    /**     * Sets the thread that currently owns exclusive access. A     * <tt>null</tt> argument indicates that no thread owns access.     * This method does not otherwise impose any synchronization or     * <tt>volatile</tt> field accesses.     */    protected final void setExclusiveOwnerThread(Thread t) {        exclusiveOwnerThread = t;    }    /**     * Returns the thread last set by     * <tt>setExclusiveOwnerThread</tt>, or <tt>null</tt> if never     * set.  This method does not otherwise impose any synchronization     * or <tt>volatile</tt> field accesses.     * @return the owner thread     */    protected final Thread getExclusiveOwnerThread() {        return exclusiveOwnerThread;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -