Package system.threading
Class ThreadPool
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.threading.ThreadPool
-
- All Implemented Interfaces:
IJCOBridgeReflected
public class ThreadPool extends NetObject
The base .NET class managing System.Threading.ThreadPool, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Threading.ThreadPool
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: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089static java.lang.StringassemblyShortNameAssembly name: mscorlibstatic java.lang.StringclassNameQualified class name: System.Threading.ThreadPoolstatic JCTypeclassTypeThe type managed from JCOBridge.
-
Constructor Summary
Constructors Constructor Description ThreadPool()ThreadPool(java.lang.Object instance)Internal constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanBindHandle(SafeHandle osHandle)static ThreadPoolcast(IJCOBridgeReflected from)Try to cast theIJCOBridgeReflectedinstance intoThreadPool, a cast assert is made to check if types are compatible.static voidGetAvailableThreads(JCORefOut<java.util.concurrent.atomic.AtomicInteger> workerThreads, JCORefOut<java.util.concurrent.atomic.AtomicInteger> completionPortThreads)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 objectJCTypegetJCOType()Returns the instantiated class Typestatic voidGetMaxThreads(JCORefOut<java.util.concurrent.atomic.AtomicInteger> workerThreads, JCORefOut<java.util.concurrent.atomic.AtomicInteger> completionPortThreads)static voidGetMinThreads(JCORefOut<java.util.concurrent.atomic.AtomicInteger> workerThreads, JCORefOut<java.util.concurrent.atomic.AtomicInteger> completionPortThreads)static booleanQueueUserWorkItem(WaitCallback callBack)static booleanQueueUserWorkItem(WaitCallback callBack, NetObject state)static RegisteredWaitHandleRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, int millisecondsTimeOutInterval, boolean executeOnlyOnce)static RegisteredWaitHandleRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, long millisecondsTimeOutInterval, boolean executeOnlyOnce)static RegisteredWaitHandleRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, TimeSpan timeout, boolean executeOnlyOnce)static RegisteredWaitHandleRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, UInt32 millisecondsTimeOutInterval, boolean executeOnlyOnce)voidsetJCOInstance(JCObject instance)static booleanSetMaxThreads(int workerThreads, int completionPortThreads)static booleanSetMinThreads(int workerThreads, int completionPortThreads)static booleanUnsafeQueueUserWorkItem(WaitCallback callBack, NetObject state)static RegisteredWaitHandleUnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, int millisecondsTimeOutInterval, boolean executeOnlyOnce)static RegisteredWaitHandleUnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, long millisecondsTimeOutInterval, boolean executeOnlyOnce)static RegisteredWaitHandleUnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, TimeSpan timeout, boolean executeOnlyOnce)static RegisteredWaitHandleUnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, UInt32 millisecondsTimeOutInterval, boolean executeOnlyOnce)
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: mscorlib- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: System.Threading.ThreadPool- See Also:
- Constant Field Values
-
-
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(JCObject instance)
- Overrides:
setJCOInstancein classNetObject
-
getJCOType
public 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 ThreadPool cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflectedinstance intoThreadPool, a cast assert is made to check if types are compatible.- Parameters:
from-IJCOBridgeReflectedinstance to be casted- Returns:
ThreadPoolinstance- Throws:
java.lang.Throwable- in case of error during cast operation
-
BindHandle
public static boolean BindHandle(SafeHandle osHandle) throws java.lang.Throwable, ArgumentNullException
- Throws:
java.lang.ThrowableArgumentNullException
-
QueueUserWorkItem
public static boolean QueueUserWorkItem(WaitCallback callBack) throws java.lang.Throwable, SecurityException, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, InvalidOperationException, NullReferenceException, EventSourceException, LockRecursionException, ObjectDisposedException, SynchronizationLockException
-
QueueUserWorkItem
public static boolean QueueUserWorkItem(WaitCallback callBack, NetObject state) throws java.lang.Throwable, SecurityException, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, InvalidOperationException, NullReferenceException, EventSourceException, LockRecursionException, ObjectDisposedException, SynchronizationLockException
-
SetMaxThreads
public static boolean SetMaxThreads(int workerThreads, int completionPortThreads) throws java.lang.Throwable- Throws:
java.lang.Throwable
-
SetMinThreads
public static boolean SetMinThreads(int workerThreads, int completionPortThreads) throws java.lang.Throwable- Throws:
java.lang.Throwable
-
UnsafeQueueUserWorkItem
public static boolean UnsafeQueueUserWorkItem(WaitCallback callBack, NetObject state) throws java.lang.Throwable, SecurityException, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, InvalidOperationException, NullReferenceException, EventSourceException, LockRecursionException, ObjectDisposedException, SynchronizationLockException
-
RegisterWaitForSingleObject
public static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, int millisecondsTimeOutInterval, boolean executeOnlyOnce) throws java.lang.Throwable, ArgumentOutOfRangeException, InvalidOperationException, SecurityException, ArgumentException, ArgumentNullException, NullReferenceException
- Throws:
java.lang.ThrowableArgumentOutOfRangeExceptionInvalidOperationExceptionSecurityExceptionArgumentExceptionArgumentNullExceptionNullReferenceException
-
RegisterWaitForSingleObject
public static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, long millisecondsTimeOutInterval, boolean executeOnlyOnce) throws java.lang.Throwable, ArgumentOutOfRangeException, InvalidOperationException, SecurityException, ArgumentException, ArgumentNullException, NullReferenceException
- Throws:
java.lang.ThrowableArgumentOutOfRangeExceptionInvalidOperationExceptionSecurityExceptionArgumentExceptionArgumentNullExceptionNullReferenceException
-
RegisterWaitForSingleObject
public static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, TimeSpan timeout, boolean executeOnlyOnce) throws java.lang.Throwable, ArgumentOutOfRangeException, InvalidOperationException, SecurityException, ArgumentException, ArgumentNullException, NullReferenceException
- Throws:
java.lang.ThrowableArgumentOutOfRangeExceptionInvalidOperationExceptionSecurityExceptionArgumentExceptionArgumentNullExceptionNullReferenceException
-
RegisterWaitForSingleObject
public static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, UInt32 millisecondsTimeOutInterval, boolean executeOnlyOnce) throws java.lang.Throwable, InvalidOperationException, SecurityException, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, NullReferenceException
- Throws:
java.lang.ThrowableInvalidOperationExceptionSecurityExceptionArgumentExceptionArgumentNullExceptionArgumentOutOfRangeExceptionNullReferenceException
-
UnsafeRegisterWaitForSingleObject
public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, int millisecondsTimeOutInterval, boolean executeOnlyOnce) throws java.lang.Throwable, ArgumentOutOfRangeException, InvalidOperationException, SecurityException, ArgumentException, ArgumentNullException, NullReferenceException
- Throws:
java.lang.ThrowableArgumentOutOfRangeExceptionInvalidOperationExceptionSecurityExceptionArgumentExceptionArgumentNullExceptionNullReferenceException
-
UnsafeRegisterWaitForSingleObject
public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, long millisecondsTimeOutInterval, boolean executeOnlyOnce) throws java.lang.Throwable, ArgumentOutOfRangeException, InvalidOperationException, SecurityException, ArgumentException, ArgumentNullException, NullReferenceException
- Throws:
java.lang.ThrowableArgumentOutOfRangeExceptionInvalidOperationExceptionSecurityExceptionArgumentExceptionArgumentNullExceptionNullReferenceException
-
UnsafeRegisterWaitForSingleObject
public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, TimeSpan timeout, boolean executeOnlyOnce) throws java.lang.Throwable, ArgumentOutOfRangeException, InvalidOperationException, SecurityException, ArgumentException, ArgumentNullException, NullReferenceException
- Throws:
java.lang.ThrowableArgumentOutOfRangeExceptionInvalidOperationExceptionSecurityExceptionArgumentExceptionArgumentNullExceptionNullReferenceException
-
UnsafeRegisterWaitForSingleObject
public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callBack, NetObject state, UInt32 millisecondsTimeOutInterval, boolean executeOnlyOnce) throws java.lang.Throwable, InvalidOperationException, SecurityException, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, NullReferenceException
- Throws:
java.lang.ThrowableInvalidOperationExceptionSecurityExceptionArgumentExceptionArgumentNullExceptionArgumentOutOfRangeExceptionNullReferenceException
-
GetAvailableThreads
public static void GetAvailableThreads(JCORefOut<java.util.concurrent.atomic.AtomicInteger> workerThreads, JCORefOut<java.util.concurrent.atomic.AtomicInteger> completionPortThreads) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
GetMaxThreads
public static void GetMaxThreads(JCORefOut<java.util.concurrent.atomic.AtomicInteger> workerThreads, JCORefOut<java.util.concurrent.atomic.AtomicInteger> completionPortThreads) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
-