Table of Contents

Class Semaphore

Namespace
Java.Util.Concurrent
Assembly
MASES.JNet.dll
public class Semaphore : Serializable, IDynamicMetaObjectProvider, IJVMBridgeCore, IDisposable, IJVMBridgeBaseStatic, IJVMBridgeBase, IJVMBridgeDefinition, ISerializable
Inheritance
JVMBridgeBase
JVMBridgeBase<Serializable>
Semaphore
Implements
IJVMBridgeCore
IJVMBridgeBaseStatic
IJVMBridgeBase
IJVMBridgeDefinition
Inherited Members
JVMBridgeBase<Serializable>.IsAssignableFrom(IJavaType)
JVMBridgeBase<Serializable>.IsAssignableFrom<T>()
JVMBridgeBase<Serializable>.Execute<T>(params T[])
JVMBridgeBase<Serializable>.DynBridgeClazz
JVMBridgeBase<Serializable>.BridgeClazz
JVMBridgeBase.RuntimeClassNameOf<T>()
JVMBridgeBase.ClassNameOf<T>()
JVMBridgeBase.ClassOf<T>()
JVMBridgeBase.WrapsDirect<TNewClass>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass, TReturn>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass, TReturn, TConverter>(IJavaObject)
JVMBridgeBase.MonitorEnter()
JVMBridgeBase.MonitorExit()
JVMBridgeBase.IsInstanceOf(IJavaType)
JVMBridgeBase.IsInstanceOf<T>()
JVMBridgeBase.RuntimeIsInstanceOf<T>()
JVMBridgeBase.CastTo<TNewClass>()
JVMBridgeBase.CastDirect<TNewClass>()
JVMBridgeBase.Dispose()
JVMBridgeBase.ToString()
JVMBridgeBase.GetHashCode()
JVMBridgeBase.Notify()
JVMBridgeBase.NotifyAll()
JVMBridgeBase.Wait()
JVMBridgeBase.DynBridgeInstance
JVMBridgeBase.BridgeInstance
JVMBridgeBase.IsBridgeListener
Extension Methods

Constructors

Semaphore()

Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge

public Semaphore()

Semaphore(int)

public Semaphore(int arg0)

Parameters

arg0 int

int

Semaphore(int, bool)

public Semaphore(int arg0, bool arg1)

Parameters

arg0 int

int

arg1 bool

bool

Semaphore(params object[])

Generic constructor: it is useful for JCOBridge when there is a derived class which needs to pass arguments to the highest JVMBridgeBase class

public Semaphore(params object[] args)

Parameters

args object[]

Properties

BridgeClassName

public override string BridgeClassName { get; }

Property Value

string

IsBridgeAbstract

public override bool IsBridgeAbstract { get; }

Property Value

bool

IsBridgeCloseable

public override bool IsBridgeCloseable { get; }

Property Value

bool

IsBridgeInterface

public override bool IsBridgeInterface { get; }

Property Value

bool

IsBridgeStatic

public override bool IsBridgeStatic { get; }

Property Value

bool

QueueLength

public int QueueLength { get; }

Property Value

int

Methods

Acquire()

public void Acquire()

Exceptions

InterruptedException

Acquire(int)

public void Acquire(int arg0)

Parameters

arg0 int

int

Exceptions

InterruptedException

AcquireUninterruptibly()

public void AcquireUninterruptibly()

AcquireUninterruptibly(int)

public void AcquireUninterruptibly(int arg0)

Parameters

arg0 int

int

AvailablePermits()

public int AvailablePermits()

Returns

int

int

DrainPermits()

public int DrainPermits()

Returns

int

int

HasQueuedThreads()

public bool HasQueuedThreads()

Returns

bool

bool

IsFair()

public bool IsFair()

Returns

bool

bool

Release()

public void Release()

Release(int)

public void Release(int arg0)

Parameters

arg0 int

int

TryAcquire()

public bool TryAcquire()

Returns

bool

bool

TryAcquire(int)

public bool TryAcquire(int arg0)

Parameters

arg0 int

int

Returns

bool

bool

TryAcquire(int, long, TimeUnit)

public bool TryAcquire(int arg0, long arg1, TimeUnit arg2)

Parameters

arg0 int

int

arg1 long

long

arg2 TimeUnit

TimeUnit

Returns

bool

bool

Exceptions

InterruptedException

TryAcquire(long, TimeUnit)

public bool TryAcquire(long arg0, TimeUnit arg1)

Parameters

arg0 long

long

arg1 TimeUnit

TimeUnit

Returns

bool

bool

Exceptions

InterruptedException