org.apache.lucene.codecs

## Class LiveDocsFormat

- java.lang.Object
- - org.apache.lucene.codecs.LiveDocsFormat

Direct Known Subclasses:
  Lucene40LiveDocsFormat

    public abstract class LiveDocsFormat
    extends Object

Format for live/deleted documents

WARNING: This API is experimental and might change in incompatible ways in the next release.

### Constructor Summary

Constructors
`protected` `LiveDocsFormat()` Sole constructor.

### Method Summary

Methods
`abstract void` `files(SegmentInfoPerCommit info, Collection<String> files)` Records all files in use by this `SegmentInfoPerCommit` into the files argument.
`abstract MutableBits` `newLiveDocs(Bits existing)` Creates a new mutablebits of the same bits set and size of existing.
`abstract MutableBits` `newLiveDocs(int size)` Creates a new MutableBits, with all bits set, for the specified size.
`abstract Bits` `readLiveDocs(Directory dir, SegmentInfoPerCommit info, IOContext context)` Read live docs bits.
`abstract void` `writeLiveDocs(MutableBits bits, Directory dir, SegmentInfoPerCommit info, int newDelCount, IOContext context)` Persist live docs bits.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### LiveDocsFormat

    protected LiveDocsFormat()

Sole constructor. (For invocation by subclass constructors, typically implicit.)

### Method Detail

#### newLiveDocs

    public abstract MutableBits newLiveDocs(int size)
                                     throws IOException

Creates a new MutableBits, with all bits set, for the specified size.

Throws:
  `IOException`

#### newLiveDocs

    public abstract MutableBits newLiveDocs(Bits existing)
                                     throws IOException

Creates a new mutablebits of the same bits set and size of existing.

Throws:
  `IOException`

#### readLiveDocs

    public abstract Bits readLiveDocs(Directory dir,
                    SegmentInfoPerCommit info,
                    IOContext context)
                               throws IOException

Read live docs bits.

Throws:
  `IOException`

#### writeLiveDocs

    public abstract void writeLiveDocs(MutableBits bits,
                     Directory dir,
                     SegmentInfoPerCommit info,
                     int newDelCount,
                     IOContext context)
                                throws IOException

Persist live docs bits. Use `SegmentInfoPerCommit.getNextDelGen()` to determine the generation of the deletes file you should write to.

Throws:
  `IOException`

#### files

    public abstract void files(SegmentInfoPerCommit info,
             Collection<String> files)
                        throws IOException

Records all files in use by this `SegmentInfoPerCommit` into the files argument.

Throws:
  `IOException`