Tabnine Logo
RefCount.release
Code IndexAdd Tabnine to your IDE (free)

How to use
release
method
in
org.apache.lucene.util.RefCount

Best Java code snippets using org.apache.lucene.util.RefCount.release (Showing top 4 results out of 315)

origin: org.apache.lucene/lucene-core

/**
 * Decrements the reference counting of this object. When reference counting
 * hits 0, calls {@link #release()}.
 */
public final void decRef() throws IOException {
 final int rc = refCount.decrementAndGet();
 if (rc == 0) {
  boolean success = false;
  try {
   release();
   success = true;
  } finally {
   if (!success) {
    // Put reference back on failure
    refCount.incrementAndGet();
   }
  }
 } else if (rc < 0) {
  throw new IllegalStateException("too many decRef calls: refCount is " + rc + " after decrement");
 }
}

origin: harbby/presto-connectors

/**
 * Decrements the reference counting of this object. When reference counting
 * hits 0, calls {@link #release()}.
 */
public final void decRef() throws IOException {
 final int rc = refCount.decrementAndGet();
 if (rc == 0) {
  boolean success = false;
  try {
   release();
   success = true;
  } finally {
   if (!success) {
    // Put reference back on failure
    refCount.incrementAndGet();
   }
  }
 } else if (rc < 0) {
  throw new IllegalStateException("too many decRef calls: refCount is " + rc + " after decrement");
 }
}

origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene

/**
 * Decrements the reference counting of this object. When reference counting
 * hits 0, calls {@link #release()}.
 */
public final void decRef() throws IOException {
 final int rc = refCount.decrementAndGet();
 if (rc == 0) {
  boolean success = false;
  try {
   release();
   success = true;
  } finally {
   if (!success) {
    // Put reference back on failure
    refCount.incrementAndGet();
   }
  }
 } else if (rc < 0) {
  throw new IllegalStateException("too many decRef calls: refCount is " + rc + " after decrement");
 }
}

origin: org.infinispan/infinispan-embedded-query

/**
 * Decrements the reference counting of this object. When reference counting
 * hits 0, calls {@link #release()}.
 */
public final void decRef() throws IOException {
 final int rc = refCount.decrementAndGet();
 if (rc == 0) {
  boolean success = false;
  try {
   release();
   success = true;
  } finally {
   if (!success) {
    // Put reference back on failure
    refCount.incrementAndGet();
   }
  }
 } else if (rc < 0) {
  throw new IllegalStateException("too many decRef calls: refCount is " + rc + " after decrement");
 }
}

org.apache.lucene.utilRefCountrelease

Javadoc

Called when reference counting hits 0. By default this method does nothing, but extensions can override to e.g. release resources attached to object that is managed by this class.

Popular methods of RefCount

  • decRef
    Decrements the reference counting of this object. When reference counting hits 0, calls #release().
  • get
  • incRef
    Increments the reference count. Calls to this method must be matched with calls to #decRef().

Popular in Java

  • Creating JSON documents from java classes using gson
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now