jdk/src/share/classes/java/util/concurrent/locks/package-info.java
author never
Mon, 12 Jul 2010 22:27:18 -0700
changeset 5926 a36f90d986b6
parent 5506 202f599c92aa
child 9242 ef138d47df58
permissions -rw-r--r--
6968385: malformed xml in sweeper logging Reviewed-by: kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     6
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     8
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
 * This file is available under and governed by the GNU General Public
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 * License version 2 only, as published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 * However, the following notice accompanied the original version of this
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 * file:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * Written by Doug Lea with assistance from members of JCP JSR-166
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * Expert Group and released to the public domain, as explained at
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * http://creativecommons.org/licenses/publicdomain
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * Interfaces and classes providing a framework for locking and waiting
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * for conditions that is distinct from built-in synchronization and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * monitors.  The framework permits much greater flexibility in the use of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * locks and conditions, at the expense of more awkward syntax.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * <p>The {@link java.util.concurrent.locks.Lock} interface supports
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * locking disciplines that differ in semantics (reentrant, fair, etc),
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * and that can be used in non-block-structured contexts including
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * hand-over-hand and lock reordering algorithms.  The main implementation
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * is {@link java.util.concurrent.locks.ReentrantLock}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 * <p>The {@link java.util.concurrent.locks.ReadWriteLock} interface
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * similarly defines locks that may be shared among readers but are
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * exclusive to writers.  Only a single implementation, {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * java.util.concurrent.locks.ReentrantReadWriteLock}, is provided, since
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 * it covers most standard usage contexts.  But programmers may create
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 * their own implementations to cover nonstandard requirements.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 * <p>The {@link java.util.concurrent.locks.Condition} interface
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 * describes condition variables that may be associated with Locks.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 * These are similar in usage to the implicit monitors accessed using
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 * {@code Object.wait}, but offer extended capabilities.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 * In particular, multiple {@code Condition} objects may be associated
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
 * with a single {@code Lock}.  To avoid compatibility issues, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 * names of {@code Condition} methods are different from the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 * corresponding {@code Object} versions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 * <p>The {@link java.util.concurrent.locks.AbstractQueuedSynchronizer}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
 * class serves as a useful superclass for defining locks and other
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 * synchronizers that rely on queuing blocked threads.  The {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
 * java.util.concurrent.locks.AbstractQueuedLongSynchronizer} class
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
 * provides the same functionality but extends support to 64 bits of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
 * synchronization state.  Both extend class {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
 * java.util.concurrent.locks.AbstractOwnableSynchronizer}, a simple
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
 * class that helps record the thread currently holding exclusive
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
 * synchronization.  The {@link java.util.concurrent.locks.LockSupport}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
 * class provides lower-level blocking and unblocking support that is
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
 * useful for those developers implementing their own customized lock
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
 * classes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
 * @since 1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
package java.util.concurrent.locks;