Module 
Package org.xnio

Interface Pooled<T>

Type Parameters:
T - the pooled resource type
All Superinterfaces:
AutoCloseable

public interface Pooled<T> extends AutoCloseable
Deprecated.
A resource which is pooled.
Author:
David M. Lloyd
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated.
    Delegates to free().
    void
    Deprecated.
    Discard this resource.
    void
    Deprecated.
    Free this resource for immediate re-use.
    Deprecated.
    Get the pooled resource.
  • Method Details

    • discard

      void discard()
      Deprecated.
      Discard this resource. Any backing resources corresponding to this pooled resource will be rendered unavailable until the pooled resource has been garbage-collected.
    • free

      void free()
      Deprecated.
      Free this resource for immediate re-use. The resource must not be accessed again after calling this method; if it is possible that an instance is still in use, you must call discard() instead.
    • getResource

      T getResource() throws IllegalStateException
      Deprecated.
      Get the pooled resource.
      Returns:
      the pooled resource
      Throws:
      IllegalStateException - if the resource has been freed or discarded already
    • close

      void close()
      Deprecated.
      Delegates to free().
      Specified by:
      close in interface AutoCloseable