This file is indexed.

/usr/include/CLucene/index/DirectoryIndexReader.h is in libclucene-dev 2.3.3.4-4build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/*------------------------------------------------------------------------------
* Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team
*
* Distributable under the terms of either the Apache License (Version 2.0) or
* the GNU Lesser General Public License, as specified in the COPYING file.
------------------------------------------------------------------------------*/
#ifndef _lucene_index_DirectoryIndexReader_
#define _lucene_index_DirectoryIndexReader_

#include "IndexReader.h"

CL_CLASS_DEF(store,LuceneLock)

CL_NS_DEF(index)
class IndexDeletionPolicy;

/**
 * IndexReader implementation that has access to a Directory.
 * Instances that have a SegmentInfos object (i. e. segmentInfos != null)
 * "own" the directory, which means that they try to acquire a write lock
 * whenever index modifications are performed.
 */
class CLUCENE_EXPORT DirectoryIndexReader: public IndexReader {
private:
  IndexDeletionPolicy* deletionPolicy;

  SegmentInfos* segmentInfos;
  CL_NS(store)::LuceneLock* writeLock;
  bool stale;

  /** Used by commit() to record pre-commit state in case
   * rollback is necessary */
  bool rollbackHasChanges;
  SegmentInfos* rollbackSegmentInfos;

  class FindSegmentsFile_Open;
  class FindSegmentsFile_Reopen;
  friend class FindSegmentsFile_Open;
  friend class FindSegmentsFile_Reopen;

protected:
  CL_NS(store)::Directory* _directory;
  bool closeDirectory;
  DirectoryIndexReader();

  /**
   * Re-opens the index using the passed-in SegmentInfos
   */
  virtual DirectoryIndexReader* doReopen(SegmentInfos* infos) = 0;


  void doClose();

  /**
   * Commit changes resulting from delete, undeleteAll, or
   * setNorm operations
   *
   * If an exception is hit, then either no changes or all
   * changes will have been committed to the index
   * (transactional semantics).
   * @throws IOException if there is a low-level IO error
   */
  void doCommit();

  virtual void commitChanges() = 0;

  /**
   * Tries to acquire the WriteLock on this directory->
   * this method is only valid if this IndexReader is directory owner.
   *
   * @throws StaleReaderException if the index has changed
   * since this reader was opened
   * @throws CorruptIndexException if the index is corrupt
   * @throws LockObtainFailedException if another writer
   *  has this index open (<code>write.lock</code> could not
   *  be obtained)
   * @throws IOException if there is a low-level IO error
   */
  void acquireWriteLock();

public:
  virtual ~DirectoryIndexReader();
  void init(CL_NS(store)::Directory* directory, SegmentInfos* segmentInfos, bool closeDirectory);

  CLUCENE_LOCAL_DECL DirectoryIndexReader(CL_NS(store)::Directory* directory, SegmentInfos* segmentInfos, bool closeDirectory);
  CLUCENE_LOCAL_DECL static DirectoryIndexReader* open(CL_NS(store)::Directory* directory, bool closeDirectory, IndexDeletionPolicy* deletionPolicy);

  IndexReader* reopen();

  void setDeletionPolicy(IndexDeletionPolicy* deletionPolicy);

  /** Returns the directory this index resides in.
   */
  CL_NS(store)::Directory* directory();

  /**
   * Version number when this IndexReader was opened.
   */
  int64_t getVersion();

  /**
   * Check whether this IndexReader is still using the
   * current (i.e., most recently committed) version of the
   * index.  If a writer has committed any changes to the
   * index since this reader was opened, this will return
   * <code>false</code>, in which case you must open a _CLNEW
   * IndexReader in order to see the changes.  See the
   * description of the <a href="IndexWriter.html#autoCommit"><code>autoCommit</code></a>
   * flag which controls when the {@link IndexWriter}
   * actually commits changes to the index.
   *
   * @throws CorruptIndexException if the index is corrupt
   * @throws IOException if there is a low-level IO error
   */
  bool isCurrent();

  /**
   * Checks is the index is optimized (if it has a single segment and no deletions)
   * @return <code>true</code> if the index is optimized; <code>false</code> otherwise
   */
  bool isOptimized();

  /**
   * Should internally checkpoint state that will change
   * during commit so that we can rollback if necessary.
   */
  CLUCENE_LOCAL_DECL void startCommit();

  /**
   * Rolls back state to just before the commit (this is
   * called by commit() if there is some exception while
   * committing).
   */
  CLUCENE_LOCAL_DECL void rollbackCommit();

};

CL_NS_END
#endif