Package system.threading
Class SemaphoreSlim
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.threading.SemaphoreSlim
-
- All Implemented Interfaces:
java.lang.AutoCloseable,IJCOBridgeReflected
public class SemaphoreSlim extends NetObject implements java.lang.AutoCloseable
The base .NET class managing System.Threading.SemaphoreSlim, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Threading.SemaphoreSlim
Powered by JCOBridge: more info at https://www.jcobridge.com
- Author:
- MASES s.r.l https://masesgroup.com
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringassemblyFullNameFully assembly qualified name: System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798estatic java.lang.StringassemblyShortNameAssembly name: System.Private.CoreLibstatic java.lang.StringclassNameQualified class name: System.Threading.SemaphoreSlimstatic org.mases.jcobridge.JCTypeclassTypeThe type managed from JCOBridge.
-
Constructor Summary
Constructors Constructor Description SemaphoreSlim()SemaphoreSlim(int initialCount)SemaphoreSlim(int initialCount, int maxCount)SemaphoreSlim(java.lang.Object instance)Internal constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SemaphoreSlimcast(IJCOBridgeReflected from)Try to cast theIJCOBridgeReflectedinstance intoSemaphoreSlim, a cast assert is made to check if types are compatible.voidclose()voidDispose()WaitHandlegetAvailableWaitHandle()intgetCurrentCount()java.lang.StringgetJCOAssemblyName()Returns the reflected Assembly namejava.lang.StringgetJCOClassName()Returns the reflected Class namejava.lang.ObjectgetJCOInstance()Returns the instantiated classjava.lang.StringgetJCOObjectName()Returns the reflected Class name used to build the objectorg.mases.jcobridge.JCTypegetJCOType()Returns the instantiated class TypeintRelease()intRelease(int releaseCount)voidsetJCOInstance(org.mases.jcobridge.JCObject instance)voidWait()booleanWait(int millisecondsTimeout)booleanWait(int millisecondsTimeout, CancellationToken cancellationToken)voidWait(CancellationToken cancellationToken)booleanWait(TimeSpan timeout)booleanWait(TimeSpan timeout, CancellationToken cancellationToken)TaskWaitAsync()TaskWaitAsync(CancellationToken cancellationToken)
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: System.Private.CoreLib- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: System.Threading.SemaphoreSlim- See Also:
- Constant Field Values
-
classType
public static org.mases.jcobridge.JCType classType
The type managed from JCOBridge. SeeJCType
-
-
Constructor Detail
-
SemaphoreSlim
public SemaphoreSlim(java.lang.Object instance) throws java.lang.ThrowableInternal constructor. Use with caution- Throws:
java.lang.Throwable
-
SemaphoreSlim
public SemaphoreSlim() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
SemaphoreSlim
public SemaphoreSlim(int initialCount, int maxCount) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException
-
SemaphoreSlim
public SemaphoreSlim(int initialCount) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArrayTypeMismatchException, CultureNotFoundException, ObjectDisposedException
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Assembly name- Specified by:
getJCOAssemblyNamein interfaceIJCOBridgeReflected- Overrides:
getJCOAssemblyNamein classNetObject- Returns:
- A
Stringrepresenting the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name- Specified by:
getJCOClassNamein interfaceIJCOBridgeReflected- Overrides:
getJCOClassNamein classNetObject- Returns:
- A
Stringrepresenting the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name used to build the object- Specified by:
getJCOObjectNamein interfaceIJCOBridgeReflected- Overrides:
getJCOObjectNamein classNetObject- Returns:
- A
Stringrepresenting the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class- Specified by:
getJCOInstancein interfaceIJCOBridgeReflected- Overrides:
getJCOInstancein classNetObject- Returns:
- An
Objectrepresenting the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(org.mases.jcobridge.JCObject instance)
- Overrides:
setJCOInstancein classNetObject
-
getJCOType
public org.mases.jcobridge.JCType getJCOType()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class Type- Specified by:
getJCOTypein interfaceIJCOBridgeReflected- Overrides:
getJCOTypein classNetObject- Returns:
- A
JCTyperepresenting the CLR Type of the instantiated Class
-
cast
public static SemaphoreSlim cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflectedinstance intoSemaphoreSlim, a cast assert is made to check if types are compatible.- Parameters:
from-IJCOBridgeReflectedinstance to be casted- Returns:
SemaphoreSliminstance- Throws:
java.lang.Throwable- in case of error during cast operation
-
Wait
public boolean Wait(int millisecondsTimeout, CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException, OperationCanceledException, NullReferenceException, OutOfMemoryException, TaskSchedulerException, EventSourceException, TaskCanceledException, AggregateException- Throws:
java.lang.ThrowableArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionNotSupportedExceptionArrayTypeMismatchExceptionIndexOutOfRangeExceptionRankExceptionCultureNotFoundExceptionObjectDisposedExceptionOperationCanceledExceptionNullReferenceExceptionOutOfMemoryExceptionTaskSchedulerExceptionEventSourceExceptionTaskCanceledExceptionAggregateException
-
Wait
public boolean Wait(int millisecondsTimeout) throws java.lang.Throwable, PlatformNotSupportedException, NotSupportedException, ArgumentException, ObjectDisposedException, OperationCanceledException, NullReferenceException, ArgumentOutOfRangeException, OutOfMemoryException, TaskSchedulerException, ArgumentNullException, EventSourceException, InvalidOperationException, TaskCanceledException, AggregateException- Throws:
java.lang.ThrowablePlatformNotSupportedExceptionNotSupportedExceptionArgumentExceptionObjectDisposedExceptionOperationCanceledExceptionNullReferenceExceptionArgumentOutOfRangeExceptionOutOfMemoryExceptionTaskSchedulerExceptionArgumentNullExceptionEventSourceExceptionInvalidOperationExceptionTaskCanceledExceptionAggregateException
-
Wait
public boolean Wait(TimeSpan timeout, CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException, OperationCanceledException, NullReferenceException, OutOfMemoryException, TaskSchedulerException, EventSourceException, TaskCanceledException, AggregateException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionNotSupportedExceptionArrayTypeMismatchExceptionIndexOutOfRangeExceptionRankExceptionCultureNotFoundExceptionObjectDisposedExceptionOperationCanceledExceptionNullReferenceExceptionOutOfMemoryExceptionTaskSchedulerExceptionEventSourceExceptionTaskCanceledExceptionAggregateException
-
Wait
public boolean Wait(TimeSpan timeout) throws java.lang.Throwable, ArgumentException, ArgumentNullException, PlatformNotSupportedException, ArgumentOutOfRangeException, InvalidOperationException, NotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, RankException, CultureNotFoundException, ObjectDisposedException, OperationCanceledException, NullReferenceException, OutOfMemoryException, TaskSchedulerException, EventSourceException, TaskCanceledException, AggregateException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentNullExceptionPlatformNotSupportedExceptionArgumentOutOfRangeExceptionInvalidOperationExceptionNotSupportedExceptionArrayTypeMismatchExceptionIndexOutOfRangeExceptionRankExceptionCultureNotFoundExceptionObjectDisposedExceptionOperationCanceledExceptionNullReferenceExceptionOutOfMemoryExceptionTaskSchedulerExceptionEventSourceExceptionTaskCanceledExceptionAggregateException
-
Release
public int Release() throws java.lang.Throwable, PlatformNotSupportedException, NotSupportedException, ArgumentException, ObjectDisposedException, ArgumentOutOfRangeException, SemaphoreFullException, NullReferenceException, ArgumentNullException, InvalidOperationException
-
Release
public int Release(int releaseCount) throws java.lang.Throwable, PlatformNotSupportedException, ObjectDisposedException, ArgumentOutOfRangeException, ArgumentException, ArgumentNullException, SemaphoreFullException, NullReferenceException, NotSupportedException, IndexOutOfRangeException, RankException, ArrayTypeMismatchException, InvalidOperationException- Throws:
java.lang.ThrowablePlatformNotSupportedExceptionObjectDisposedExceptionArgumentOutOfRangeExceptionArgumentExceptionArgumentNullExceptionSemaphoreFullExceptionNullReferenceExceptionNotSupportedExceptionIndexOutOfRangeExceptionRankExceptionArrayTypeMismatchExceptionInvalidOperationException
-
WaitAsync
public Task WaitAsync() throws java.lang.Throwable, PlatformNotSupportedException, NotSupportedException, ArgumentException, ObjectDisposedException, ArgumentOutOfRangeException, IndexOutOfRangeException, FormatException, InvalidOperationException, OutOfMemoryException, ArgumentNullException
-
WaitAsync
public Task WaitAsync(CancellationToken cancellationToken) throws java.lang.Throwable, PlatformNotSupportedException, NotSupportedException, ArgumentException, ObjectDisposedException, ArgumentOutOfRangeException, IndexOutOfRangeException, FormatException, InvalidOperationException, OutOfMemoryException, ArgumentNullException
-
Dispose
public void Dispose() throws java.lang.Throwable, ObjectDisposedException, ArgumentNullException- Throws:
java.lang.ThrowableObjectDisposedExceptionArgumentNullException
-
Wait
public void Wait() throws java.lang.Throwable, PlatformNotSupportedException, NotSupportedException, ArgumentException, ObjectDisposedException, OperationCanceledException, NullReferenceException, ArgumentOutOfRangeException, OutOfMemoryException, TaskSchedulerException, ArgumentNullException, EventSourceException, InvalidOperationException, TaskCanceledException, AggregateException- Throws:
java.lang.ThrowablePlatformNotSupportedExceptionNotSupportedExceptionArgumentExceptionObjectDisposedExceptionOperationCanceledExceptionNullReferenceExceptionArgumentOutOfRangeExceptionOutOfMemoryExceptionTaskSchedulerExceptionArgumentNullExceptionEventSourceExceptionInvalidOperationExceptionTaskCanceledExceptionAggregateException
-
Wait
public void Wait(CancellationToken cancellationToken) throws java.lang.Throwable, PlatformNotSupportedException, NotSupportedException, ArgumentException, ObjectDisposedException, OperationCanceledException, NullReferenceException, ArgumentOutOfRangeException, OutOfMemoryException, TaskSchedulerException, ArgumentNullException, EventSourceException, InvalidOperationException, TaskCanceledException, AggregateException
- Throws:
java.lang.ThrowablePlatformNotSupportedExceptionNotSupportedExceptionArgumentExceptionObjectDisposedExceptionOperationCanceledExceptionNullReferenceExceptionArgumentOutOfRangeExceptionOutOfMemoryExceptionTaskSchedulerExceptionArgumentNullExceptionEventSourceExceptionInvalidOperationExceptionTaskCanceledExceptionAggregateException
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.Exception
-
getCurrentCount
public int getCurrentCount() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
getAvailableWaitHandle
public WaitHandle getAvailableWaitHandle() throws java.lang.Throwable, PlatformNotSupportedException, ObjectDisposedException, ArgumentException, ArgumentNullException, MissingMethodException, TargetInvocationException, ArgumentOutOfRangeException, InvalidOperationException, OutOfMemoryException
-
-