io.qt.core.QMutex Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qtjambi Show documentation
Show all versions of qtjambi Show documentation
QtJambi base module containing QtCore, QtGui and QtWidgets.
package io.qt.core;
import io.qt.*;
/**
* Access serialization between threads
* Java wrapper for Qt class QMutex
*/
public class QMutex extends io.qt.core.QBasicMutex
{
/**
* See QMutex:: QMutex()
*/
public QMutex(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QMutex instance);
/**
* See QMutex:: tryLock(QDeadlineTimer)
*/
@QtUninvokable
public final boolean tryLock(io.qt.core.@NonNull QDeadlineTimer timeout){
return tryLock_native_QDeadlineTimer(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(timeout));
}
@QtUninvokable
private native boolean tryLock_native_QDeadlineTimer(long __this__nativeId, long timeout);
/**
*
*/
@QtUninvokable
public final boolean tryLock(int timeout){
return tryLock_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), timeout);
}
@QtUninvokable
private native boolean tryLock_native_int(long __this__nativeId, int timeout);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QMutex(QPrivateConstructor p) { super(p); }
/**
* See QMutex:: try_lock_for(std::chrono::duration)
*/
@QtUninvokable
public final boolean tryLockFor(java.time.temporal.@NonNull TemporalAmount duration){
return tryLock(new QDeadlineTimer(duration));
}
/**
* See QMutex:: try_lock_until(std::chrono::time_point)
*/
@QtUninvokable
public final boolean tryLockUntil(java.time.temporal.@NonNull Temporal timePoint){
return tryLock(new QDeadlineTimer(timePoint));
}
/**
* Overloaded function for {@link #tryLock(io.qt.core.QDeadlineTimer)}.
*/
@QtUninvokable
public final boolean tryLock(io.qt.core.QDeadlineTimer.@NonNull ForeverConstant timeout) {
return tryLock(new io.qt.core.QDeadlineTimer(timeout));
}
}