com.trolltech.qt.core
Class QSystemSemaphore.AccessMode
java.lang.Object
java.lang.Enum
com.trolltech.qt.core.QSystemSemaphore.AccessMode
- All Implemented Interfaces:
- QtEnumerator, java.io.Serializable, java.lang.Comparable
- Enclosing class:
- QSystemSemaphore
public static final class QSystemSemaphore.AccessMode
- extends java.lang.Enum
- implements QtEnumerator
This enum is used by the constructor and setKey()
. Its purpose is to enable handling the problem in Unix implementations of semaphores that survive a crash. In Unix, when a semaphore survives a crash, we need a way to force it to reset its resource count, when the system reuses the semaphore. In Windows, where semaphores can't survive a crash, this enum has no effect.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Enum |
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Open
public static final QSystemSemaphore.AccessMode Open
- If the semaphore already exists, its initial resource count is not reset. If the semaphore does not already exist, it is created and its initial resource count set.
Create
public static final QSystemSemaphore.AccessMode Create
QSystemSemaphore
takes ownership of the semaphore and sets its resource count to the requested value, regardless of whether the semaphore already exists by having survived a crash. This value should be passed to the constructor, when the first semaphore for a particular key is constructed and you know that if the semaphore already exists it could only be because of a crash. In Windows, where a semaphore can't survive a crash, Create and Open have the same behavior.
values
public static QSystemSemaphore.AccessMode[] values()
valueOf
public static QSystemSemaphore.AccessMode valueOf(java.lang.String name)
value
public int value()
- This function should return an integer value for the enum values of the enumeration that implements this interface.
- Specified by:
value
in interface QtEnumerator
resolve
public static QSystemSemaphore.AccessMode resolve(int value)
- Returns the QSystemSemaphore$AccessMode constant with the specified int.