Class VFakeFence

java.lang.Object
com.io7m.jcoronado.fake.VFakeFence
All Implemented Interfaces:
VulkanFenceType, VulkanHandleNonDispatchableType, VulkanHandleType, com.io7m.jmulticlose.core.CloseableType, AutoCloseable

public final class VFakeFence extends Object implements VulkanFenceType
A fake fence.
  • Method Details

    • signal

      public void signal()
      Signal the fence.
    • reset

      public void reset()
      Reset the fence.
    • waitFor

      public void waitFor(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException
      Wait for the fence to be signalled.
      Parameters:
      timeout - The timeout
      unit - The time unit
      Throws:
      InterruptedException - On interruption
      TimeoutException - On timeouts
    • isSignalled

      public boolean isSignalled()
      Returns:
      true if this fence is signalled
    • close

      public void close()
      Description copied from interface: VulkanHandleType
      Destroy the object.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface VulkanFenceType
      Specified by:
      close in interface VulkanHandleType
    • isClosed

      public boolean isClosed()
      Specified by:
      isClosed in interface com.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 fences
      timeout - The timeout
      unit - The time unit
      Throws:
      InterruptedException - On interruption
      TimeoutException - On timeouts
    • awaitAny

      public static boolean awaitAny(List<VFakeFence> fences, long timeout, TimeUnit unit)
      Await any fences.
      Parameters:
      fences - The fences
      timeout - The timeout
      unit - The time unit
      Returns:
      true if any fences were signalled