001 /*
002 * (c) 2004, 2005, 2009, 2010 ThoughtWorks Ltd
003 * All rights reserved.
004 *
005 * The software in this package is published under the terms of the BSD
006 * style license a copy of which has been included with this distribution in
007 * the LICENSE.txt file.
008 *
009 * Created on 01-Jul-2004
010 */
011 package com.thoughtworks.proxy.toys.pool;
012
013 /**
014 * An interface automatically implemented by the proxy instances returned from an {@link Pool}. It is not necessary to
015 * implement this interface in a custom class. Cast the instance to this interface if you want to release the instance
016 * explicitly.
017 *
018 * @author Jörg Schaible
019 * @since 0.2
020 */
021 public interface Poolable {
022 /**
023 * Return the managed instance of this proxy directly to its pool.
024 *
025 * @since 0.2
026 */
027 void returnInstanceToPool();
028 }