AbstractQueuedLongSynchronizer AbstractQueuedLongSynchronizer Class

Definition

A version of AbstractQueuedSynchronizer in which synchronization state is maintained as a long.

[Android.Runtime.Register("java/util/concurrent/locks/AbstractQueuedLongSynchronizer", ApiSince=9, DoNotGenerateAcw=true)]
public abstract class AbstractQueuedLongSynchronizer : Java.Util.Concurrent.Locks.AbstractOwnableSynchronizer, IDisposable
type AbstractQueuedLongSynchronizer = class
    inherit AbstractOwnableSynchronizer
    interface ISerializable
    interface IJavaObject
    interface IDisposable
Inheritance
AbstractQueuedLongSynchronizerAbstractQueuedLongSynchronizer
Attributes
Implements

Remarks

Android platform documentation

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

AbstractQueuedLongSynchronizer() AbstractQueuedLongSynchronizer()

Creates a new AbstractQueuedLongSynchronizer instance with initial synchronization state of zero.

AbstractQueuedLongSynchronizer(IntPtr, JniHandleOwnership) AbstractQueuedLongSynchronizer(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Properties

Class Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
ExclusiveOwnerThread ExclusiveOwnerThread

Returns the thread last set by setExclusiveOwnerThread, or null if never set.

(Inherited from AbstractOwnableSynchronizer)
ExclusiveQueuedThreads ExclusiveQueuedThreads

Returns a collection containing threads that may be waiting to acquire in exclusive mode.

FirstQueuedThread FirstQueuedThread

Returns the first (longest-waiting) thread in the queue, or null if no threads are currently queued.

Handle Handle

The handle to the underlying Android instance.

(Inherited from Object)
HasContended HasContended

Queries whether any threads have ever contended to acquire this synchronizer; that is if an acquire method has ever blocked.

HasQueuedPredecessors HasQueuedPredecessors

Queries whether any threads have been waiting to acquire longer than the current thread.

HasQueuedThreads HasQueuedThreads

Queries whether any threads are waiting to acquire.

IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy Inherited from Object
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle Inherited from Object
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation Inherited from Object
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState Inherited from Object
IsHeldExclusively IsHeldExclusively

Returns true if synchronization is held exclusively with respect to the current (calling) thread.

JniIdentityHashCode JniIdentityHashCode Inherited from Object
JniPeerMembers JniPeerMembers
PeerReference PeerReference Inherited from Object
QueuedThreads QueuedThreads

Returns a collection containing threads that may be waiting to acquire.

QueueLength QueueLength

Returns an estimate of the number of threads waiting to acquire.

SharedQueuedThreads SharedQueuedThreads

Returns a collection containing threads that may be waiting to acquire in shared mode.

State State

Returns the current value of synchronization state.

ThresholdClass ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Methods

Acquire(Int64) Acquire(Int64)

Acquires in exclusive mode, ignoring interrupts.

AcquireInterruptibly(Int64) AcquireInterruptibly(Int64)

Acquires in exclusive mode, aborting if interrupted.

AcquireShared(Int64) AcquireShared(Int64)

Acquires in shared mode, ignoring interrupts.

AcquireSharedInterruptibly(Int64) AcquireSharedInterruptibly(Int64)

Acquires in shared mode, aborting if interrupted.

Clone() Clone()

Creates and returns a copy of this Object.

(Inherited from Object)
CompareAndSetState(Int64, Int64) CompareAndSetState(Int64, Int64)

Atomically sets synchronization state to the given updated value if the current state value equals the expected value.

Dispose() Dispose() Inherited from Object
Dispose(Boolean) Dispose(Boolean) Inherited from Object
Equals(Object) Equals(Object)

Compares this instance with the specified object and indicates if they are equal.

(Inherited from Object)
GetHashCode() GetHashCode()

Returns an integer hash code for this object.

(Inherited from Object)
GetWaitingThreads(AbstractQueuedLongSynchronizer+ConditionObject) GetWaitingThreads(AbstractQueuedLongSynchronizer+ConditionObject)

Returns a collection containing those threads that may be waiting on the given condition associated with this synchronizer.

GetWaitQueueLength(AbstractQueuedLongSynchronizer+ConditionObject) GetWaitQueueLength(AbstractQueuedLongSynchronizer+ConditionObject)

Returns an estimate of the number of threads waiting on the given condition associated with this synchronizer.

HasWaiters(AbstractQueuedLongSynchronizer+ConditionObject) HasWaiters(AbstractQueuedLongSynchronizer+ConditionObject)

Queries whether any threads are waiting on the given condition associated with this synchronizer.

IsQueued(Thread) IsQueued(Thread)

Returns true if the given thread is currently queued.

JavaFinalize() JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
Notify() Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll() NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
Owns(AbstractQueuedLongSynchronizer+ConditionObject) Owns(AbstractQueuedLongSynchronizer+ConditionObject)

Queries whether the given ConditionObject uses this synchronizer as its lock.

Release(Int64) Release(Int64)

Releases in exclusive mode.

ReleaseShared(Int64) ReleaseShared(Int64)

Releases in shared mode.

SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() ToArray<T>() Inherited from Object
ToString() ToString()

Returns a string containing a concise, human-readable description of this object.

(Inherited from Object)
TryAcquire(Int64) TryAcquire(Int64)

Attempts to acquire in exclusive mode.

TryAcquireNanos(Int64, Int64) TryAcquireNanos(Int64, Int64)

Attempts to acquire in exclusive mode, aborting if interrupted, and failing if the given timeout elapses.

TryAcquireShared(Int64) TryAcquireShared(Int64)

Attempts to acquire in shared mode.

TryAcquireSharedNanos(Int64, Int64) TryAcquireSharedNanos(Int64, Int64)

Attempts to acquire in shared mode, aborting if interrupted, and failing if the given timeout elapses.

TryRelease(Int64) TryRelease(Int64)

Attempts to set the state to reflect a release in exclusive mode.

TryReleaseShared(Int64) TryReleaseShared(Int64)

Attempts to set the state to reflect a release in shared mode.

UnregisterFromRuntime() UnregisterFromRuntime() Inherited from Object
Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)

Explicit Interface Implementations

IJavaObjectEx.ToLocalJniHandle() IJavaObjectEx.ToLocalJniHandle() Inherited from Object
IJavaPeerable.Disposed() IJavaPeerable.Disposed() Inherited from Object
IJavaPeerable.DisposeUnlessReferenced() IJavaPeerable.DisposeUnlessReferenced() Inherited from Object
IJavaPeerable.Finalized() IJavaPeerable.Finalized() Inherited from Object
IJavaPeerable.SetJniIdentityHashCode(Int32) IJavaPeerable.SetJniIdentityHashCode(Int32) Inherited from Object
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) Inherited from Object
IJavaPeerable.SetPeerReference(JniObjectReference) IJavaPeerable.SetPeerReference(JniObjectReference) Inherited from Object

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)

Applies to