org.apache.solr.util
Class RefCounted<Type>

java.lang.Object
  extended by org.apache.solr.util.RefCounted<Type>

public abstract class RefCounted<Type>
extends Object

Version:
$Id: RefCounted.java 472574 2006-11-08 18:25:52Z yonik $
Author:
yonik

Field Summary
protected  AtomicInteger refcount
           
protected  Type resource
           
 
Constructor Summary
RefCounted(Type resource)
           
 
Method Summary
protected abstract  void close()
           
 void decref()
           
 Type get()
           
 RefCounted<Type> incref()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resource

protected final Type resource

refcount

protected final AtomicInteger refcount
Constructor Detail

RefCounted

public RefCounted(Type resource)
Method Detail

incref

public final RefCounted<Type> incref()

get

public final Type get()

decref

public void decref()

close

protected abstract void close()


Copyright © 2006 - 2006 The Apache Software Foundation