Examples of decRef()


Examples of org.apache.lucene.index.IndexReader.decRef()

    IndexReader reader = getRunData().getIndexReader();
    getRunData().setIndexReader(null);
    if (reader.getRefCount() != 1) {
      System.out.println("WARNING: CloseReader: reference count is currently " + reader.getRefCount());
    }
    reader.decRef();
    return 1;
  }

}
View Full Code Here

Examples of org.apache.lucene.index.IndexReader.decRef()

  @Override
  public int doLogic() throws Exception {
    IndexReader r = getRunData().getIndexReader();
    r.deleteDocument(docid);
    lastDeleted = docid;
    r.decRef();
    return 1; // one work item done here
  }

  /* (non-Javadoc)
   * @see org.apache.lucene.benchmark.byTask.tasks.PerfTask#setup()
View Full Code Here

Examples of org.cometd.server.MessageImpl.decRef()

                            request.setAttribute("org.mortbay.jetty.ResponseBuffer", buffer);
                            if (metaConnectReply instanceof MessageImpl)
                                ((MessageImpl) metaConnectReply).decRef();
                            metaConnectReply = null;
                            transport = null;
                            mesgImpl.decRef();
                            continue;
                        } else if (mesgImpl.getRefs() >= _refsThreshold) {
                            // create multi-use buffer
                            byte[] contentBytes = ("[" + mesgImpl.getJSON() + ",{\"" + Bayeux.SUCCESSFUL_FIELD + "\":true,\"" + Bayeux.CHANNEL_FIELD
                                    + "\":\"" + Bayeux.META_CONNECT + "\"}]").getBytes(StringUtil.__UTF8);
View Full Code Here

Examples of org.cometd.server.MessageImpl.decRef()

                            request.setAttribute("org.mortbay.jetty.ResponseBuffer", buffer);
                            metaConnectReply = null;
                            if (metaConnectReply instanceof MessageImpl)
                                ((MessageImpl) metaConnectReply).decRef();
                            transport = null;
                            mesgImpl.decRef();
                            continue;
                        }
                    }

                    if (message != null)
View Full Code Here

Examples of org.cometd.server.MessageImpl.decRef()

                    }

                    if (message != null)
                        transport.send(message);
                    if (mesgImpl != null)
                        mesgImpl.decRef();
                }

                if (metaConnectReply != null) {
                    metaConnectReply = _bayeux.extendSendMeta(client, metaConnectReply);
                    transport.send(metaConnectReply);
View Full Code Here

Examples of org.elasticsearch.index.store.Store.decRef()

                final Store store = indexShard.store();
                store.incRef();
                try {
                    return new StoreFilesMetaData(true, shardId, store.getMetadataOrEmpty().asMap());
                } finally {
                    store.decRef();
                }
            }
        }
        // try and see if we an list unallocated
        IndexMetaData metaData = clusterService.state().metaData().index(shardId.index().name());
View Full Code Here

Examples of org.elasticsearch.index.store.Store.decRef()

                            } else {
                                exceptions.add(0, e); // last exceptions first
                            }
                        } finally {
                            try {
                                store.decRef();
                            } finally {
                                // Signify this file has completed by decrementing the latch
                                latch.countDown();
                            }
                        }
View Full Code Here

Examples of org.elasticsearch.index.store.Store.decRef()

            logger.trace("[{}][{}] recovery [phase1] to {}: took [{}]", indexName, shardId, request.targetNode(), stopWatch.totalTime());
            response.phase1Time = stopWatch.totalTime().millis();
        } catch (Throwable e) {
            throw new RecoverFilesRecoveryException(request.shardId(), response.phase1FileNames.size(), new ByteSizeValue(totalSize), e);
        } finally {
            store.decRef();
        }
    }

    /**
     * Perform phase2 of the recovery process
View Full Code Here

Examples of org.mortbay.cometd.MessageImpl.decRef()

                            request.setAttribute("org.mortbay.jetty.ResponseBuffer",buffer);
                            if (metaConnectReply instanceof MessageImpl)
                                ((MessageImpl)metaConnectReply).decRef();
                            metaConnectReply=null;
                            transport=null;
                            mesgImpl.decRef();
                            continue;
                        }
                        else if (mesgImpl.getRefs() >= _refsThreshold)
                        {
                            // create multi-use buffer
View Full Code Here

Examples of org.mortbay.cometd.MessageImpl.decRef()

                            request.setAttribute("org.mortbay.jetty.ResponseBuffer",buffer);
                            metaConnectReply=null;
                            if (metaConnectReply instanceof MessageImpl)
                                ((MessageImpl)metaConnectReply).decRef();
                            transport=null;
                            mesgImpl.decRef();
                            continue;
                        }
                    }

                    if (message != null)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.