io.qt.core.QThreadPool Maven / Gradle / Ivy
package io.qt.core;
/**
* Manages a collection of QThreads
* Java wrapper for Qt class QThreadPool
*/
public class QThreadPool extends io.qt.core.QObject
{
@io.qt.QtPropertyMember(enabled=false)
private Object __rcRunnable = null;
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QThreadPool.class);
/**
* Overloaded constructor for {@link #QThreadPool(io.qt.core.QObject)}
* with parent = null
.
*/
public QThreadPool() {
this((io.qt.core.QObject)null);
}
/**
* See QThreadPool::QThreadPool(QObject*)
*/
public QThreadPool(io.qt.core.QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, parent);
}
private native static void initialize_native(QThreadPool instance, io.qt.core.QObject parent);
/**
* See QThreadPool::activeThreadCount()const
*/
@io.qt.QtPropertyReader(name="activeThreadCount")
@io.qt.QtUninvokable
public final int activeThreadCount(){
return activeThreadCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int activeThreadCount_native_constfct(long __this__nativeId);
/**
*
*/
@io.qt.QtUninvokable
public final void clear(){
clear_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native void clear_native(long __this__nativeId);
/**
* See QThreadPool::contains(const QThread*)const
*/
@io.qt.QtUninvokable
public final boolean contains(io.qt.core.QThread thread){
return contains_native_const_QThread_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(thread));
}
@io.qt.QtUninvokable
private native boolean contains_native_const_QThread_ptr_constfct(long __this__nativeId, long thread);
/**
* See QThreadPool::expiryTimeout()const
*/
@io.qt.QtPropertyReader(name="expiryTimeout")
@io.qt.QtUninvokable
public final int expiryTimeout(){
return expiryTimeout_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int expiryTimeout_native_constfct(long __this__nativeId);
/**
* See QThreadPool::maxThreadCount()const
*/
@io.qt.QtPropertyReader(name="maxThreadCount")
@io.qt.QtUninvokable
public final int maxThreadCount(){
return maxThreadCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int maxThreadCount_native_constfct(long __this__nativeId);
/**
* See QThreadPool::releaseThread()
*/
@io.qt.QtUninvokable
public final void releaseThread(){
releaseThread_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native void releaseThread_native(long __this__nativeId);
/**
* See QThreadPool::reserveThread()
*/
@io.qt.QtUninvokable
public final void reserveThread(){
reserveThread_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native void reserveThread_native(long __this__nativeId);
/**
* See QThreadPool::setExpiryTimeout(int)
*/
@io.qt.QtPropertyWriter(name="expiryTimeout")
@io.qt.QtUninvokable
public final void setExpiryTimeout(int expiryTimeout){
setExpiryTimeout_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), expiryTimeout);
}
@io.qt.QtUninvokable
private native void setExpiryTimeout_native_int(long __this__nativeId, int expiryTimeout);
/**
* See QThreadPool::setMaxThreadCount(int)
*/
@io.qt.QtPropertyWriter(name="maxThreadCount")
@io.qt.QtUninvokable
public final void setMaxThreadCount(int maxThreadCount){
setMaxThreadCount_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), maxThreadCount);
}
@io.qt.QtUninvokable
private native void setMaxThreadCount_native_int(long __this__nativeId, int maxThreadCount);
/**
* See QThreadPool::setStackSize(uint)
*/
@io.qt.QtPropertyWriter(name="stackSize")
@io.qt.QtUninvokable
public final void setStackSize(int stackSize){
setStackSize_native_uint(QtJambi_LibraryUtilities.internal.nativeId(this), stackSize);
}
@io.qt.QtUninvokable
private native void setStackSize_native_uint(long __this__nativeId, int stackSize);
/**
* See QThreadPool::setThreadPriority(QThread::Priority)
*/
@io.qt.QtPropertyWriter(name="threadPriority")
@io.qt.QtUninvokable
public final void setThreadPriority(io.qt.core.QThread.Priority priority){
setThreadPriority_native_QThread_Priority(QtJambi_LibraryUtilities.internal.nativeId(this), priority.value());
}
@io.qt.QtUninvokable
private native void setThreadPriority_native_QThread_Priority(long __this__nativeId, int priority);
/**
* See QThreadPool::stackSize()const
*/
@io.qt.QtPropertyReader(name="stackSize")
@io.qt.QtUninvokable
public final int stackSize(){
return stackSize_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int stackSize_native_constfct(long __this__nativeId);
/**
* Overloaded function for {@link #start(java.lang.Runnable, int)}
* with priority = 0
.
*/
@io.qt.QtUninvokable
public final void start(java.lang.Runnable runnable) {
start(runnable, (int)0);
}
/**
* See QThreadPool::start(QRunnable*,int)
*/
@io.qt.QtUninvokable
public final void start(java.lang.Runnable runnable, int priority){
start_native_QRunnable_ptr_int(QtJambi_LibraryUtilities.internal.nativeId(this), runnable, priority);
__rcRunnable = runnable;
}
@io.qt.QtUninvokable
private native void start_native_QRunnable_ptr_int(long __this__nativeId, java.lang.Runnable runnable, int priority);
/**
* See QThreadPool::threadPriority()const
*/
@io.qt.QtPropertyReader(name="threadPriority")
@io.qt.QtUninvokable
public final io.qt.core.QThread.Priority threadPriority(){
return io.qt.core.QThread.Priority.resolve(threadPriority_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int threadPriority_native_constfct(long __this__nativeId);
/**
* See QThreadPool::tryStart(QRunnable*)
*/
@io.qt.QtUninvokable
public final boolean tryStart(java.lang.Runnable runnable){
boolean __qt_return_value = tryStart_native_QRunnable_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), runnable);
__rcRunnable = runnable;
return __qt_return_value;
}
@io.qt.QtUninvokable
private native boolean tryStart_native_QRunnable_ptr(long __this__nativeId, java.lang.Runnable runnable);
/**
* See QThreadPool::tryTake(QRunnable*)
*/
@io.qt.QtUninvokable
public final boolean tryTake(io.qt.core.QRunnable runnable){
return tryTake_native_QRunnable_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(runnable));
}
@io.qt.QtUninvokable
private native boolean tryTake_native_QRunnable_ptr(long __this__nativeId, long runnable);
/**
* Overloaded function for {@link #waitForDone(int)}
* with msecs = -1
.
*/
@io.qt.QtUninvokable
public final boolean waitForDone() {
return waitForDone((int)-1);
}
/**
* See QThreadPool::waitForDone(int)
*/
@io.qt.QtUninvokable
public final boolean waitForDone(int msecs){
return waitForDone_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), msecs);
}
@io.qt.QtUninvokable
private native boolean waitForDone_native_int(long __this__nativeId, int msecs);
/**
* See QThreadPool::globalInstance()
*/
public native static io.qt.core.QThreadPool globalInstance();
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QThreadPool(QPrivateConstructor p) { super(p); }
/**
* Constructor for internal use only.
* It is not allowed to call the declarative constructor from inside Java.
*/
@io.qt.NativeAccess
protected QThreadPool(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@io.qt.QtUninvokable
private static native void initialize_native(QThreadPool instance, QDeclarativeConstructor constructor);
}