Class VFakeTimelineSemaphore

java.lang.Object
com.io7m.jcoronado.fake.VFakeTimelineSemaphore
All Implemented Interfaces:
VulkanHandleNonDispatchableType, VulkanHandleType, VulkanSemaphoreTimelineType, VulkanSemaphoreType, com.io7m.jmulticlose.core.CloseableType, AutoCloseable

public final class VFakeTimelineSemaphore extends Object implements VulkanSemaphoreTimelineType
A fake timeline semaphore.
  • Constructor Details

    • VFakeTimelineSemaphore

      public VFakeTimelineSemaphore(VulkanSemaphoreTimelineCreateInfo inCreateInfo)
      A fake timeline semaphore.
      Parameters:
      inCreateInfo - The creation info
  • Method Details

    • createInfo

      public VulkanSemaphoreTimelineCreateInfo createInfo()
      Returns:
      The creation info
    • counterValue

      public long counterValue()
      Returns:
      The current timeline value
    • signal

      public void signal(long inValue)
      Signal the semaphore at the given value.
      Parameters:
      inValue - The value
    • await

      public void await(long inValue, long inTimeout, TimeUnit inUnit) throws InterruptedException, TimeoutException
      Wait for the semaphore to reach the given value.
      Parameters:
      inValue - The value to wait for
      inTimeout - The timeout
      inUnit - The timeout unit
      Throws:
      InterruptedException - If interrupted
      TimeoutException - If the timeout expires
    • close

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

      public boolean isClosed()
      Specified by:
      isClosed in interface com.io7m.jmulticlose.core.CloseableType