Class ArcDrop<T>

  • All Implemented Interfaces:

    public final class ArcDrop<T>
    extends Object
    implements Drop<T>
    • Constructor Detail

      • ArcDrop

        public ArcDrop​(Drop<T> delegate)
    • Method Detail

      • wrap

        public static <X> Drop<X> wrap​(Drop<X> drop)
      • acquire

        public static <X> Drop<X> acquire​(Drop<X> drop)
      • increment

        public ArcDrop<T> increment()
      • drop

        public void drop​(T obj)
        Description copied from interface: Drop
        Dispose of the resources in the given Resource instance.
        Specified by:
        drop in interface Drop<T>
        obj - The Resource instance being dropped.
      • fork

        public Drop<T> fork()
        Description copied from interface: Drop
        Branch the responsibility of dropping a resource. This drop instance will remain associated with its current resource, while the returned drop instance must be attached to its new resource.
        Specified by:
        fork in interface Drop<T>
        A drop instance, similar to this one, but for the purpose of being associated with a different but related resource.
      • attach

        public void attach​(T obj)
        Description copied from interface: Drop
        Called when the resource changes owner.
        Specified by:
        attach in interface Drop<T>
        obj - The new Resource instance with the new owner.
      • unwrap

        public Drop<T> unwrap()