java.lang.Object
org.gcube.informationsystem.resourceregistry.persistence.orientdb.utils.ConcurrentWriteDetector

public final class ConcurrentWriteDetector extends Object
Recognizes the failure of a write that lost the race with another write on overlapping graph elements: the backend reports it with an ONeedRetryException, which the layers above may have wrapped.
Author:
Luca Frosini (ISTI - CNR)
  • Method Details

    • isConcurrentWrite

      public static boolean isConcurrentWrite(Throwable throwable)
      Returns whether the given failure, or one of its causes, is a concurrent write lost.
      Parameters:
      throwable - the failure
      Returns:
      true if the write can be repeated as it is