Class VFakeFence
java.lang.Object
com.io7m.jcoronado.fake.VFakeFence
- All Implemented Interfaces:
VulkanFenceType, VulkanHandleNonDispatchableType, VulkanHandleType, com.io7m.jmulticlose.core.CloseableType, AutoCloseable
A fake fence.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidawaitAll(List<VFakeFence> fences, long timeout, TimeUnit unit) Await all fences.static booleanawaitAny(List<VFakeFence> fences, long timeout, TimeUnit unit) Await any fences.voidclose()Destroy the object.booleanisClosed()booleanvoidreset()Reset the fence.voidsignal()Signal the fence.voidWait for the fence to be signalled.
-
Method Details
-
signal
public void signal()Signal the fence. -
reset
public void reset()Reset the fence. -
waitFor
Wait for the fence to be signalled.- Parameters:
timeout- The timeoutunit- The time unit- Throws:
InterruptedException- On interruptionTimeoutException- On timeouts
-
isSignalled
public boolean isSignalled()- Returns:
trueif this fence is signalled
-
close
public void close()Description copied from interface:VulkanHandleTypeDestroy the object.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceVulkanFenceType- Specified by:
closein interfaceVulkanHandleType
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfacecom.io7m.jmulticlose.core.CloseableType
-
awaitAll
public static void awaitAll(List<VFakeFence> fences, long timeout, TimeUnit unit) throws InterruptedException, TimeoutException Await all fences.- Parameters:
fences- The fencestimeout- The timeoutunit- The time unit- Throws:
InterruptedException- On interruptionTimeoutException- On timeouts
-
awaitAny
Await any fences.- Parameters:
fences- The fencestimeout- The timeoutunit- The time unit- Returns:
trueif any fences were signalled
-