Class ExclusiveResource


  • @API(status=EXPERIMENTAL,
         since="1.3")
    public class ExclusiveResource
    extends java.lang.Object
    An exclusive resource identified by a key with a lock mode that is used to synchronize access to shared resources when executing nodes in parallel.
    Since:
    1.3
    See Also:
    Node.getExecutionMode()
    • Constructor Detail

      • ExclusiveResource

        public ExclusiveResource​(java.lang.String key,
                                 ExclusiveResource.LockMode lockMode)
        Create a new ExclusiveResource.
        Parameters:
        key - the identifier of the resource; never null or blank
        lockMode - the lock mode to use to synchronize access to the resource; never null
    • Method Detail

      • getKey

        public java.lang.String getKey()
        Get the key of this resource.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object