org.apache.solr.update

## Class VersionInfo

- java.lang.Object
- - org.apache.solr.update.VersionInfo

-     public class VersionInfo
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `VERSION_FIELD`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `VersionInfo(UpdateLog ulog, int nBuckets)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `blockUpdates()`
    `VersionBucket` | `bucket(int hash)`
    `static SchemaField` | `getAndCheckVersionField(IndexSchema schema)` Gets and returns the `VERSION_FIELD` from the specified schema, after verifying that it is indexed, stored, and single-valued.
    `Long` | `getMaxVersionFromIndex(IndexSearcher searcher)`
    `long` | `getNewClock()`
    `long` | `getOldClock()`
    `SchemaField` | `getVersionField()`
    `Long` | `getVersionFromIndex(BytesRef idBytes)`
    `void` | `lockForUpdate()`
    `Long` | `lookupVersion(BytesRef idBytes)`
    `void` | `reload()`
    `void` | `seedBucketsWithHighestVersion(long highestVersion)`
    `void` | `unblockUpdates()`
    `void` | `unlockForUpdate()`
    `void` | `updateClock(long clock)`

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

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

- - ### Field Detail

    - #### VERSION_FIELD

          public static final String VERSION_FIELD

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### VersionInfo

          public VersionInfo(UpdateLog ulog,
                             int nBuckets)

  - ### Method Detail

    - #### getAndCheckVersionField

          public static SchemaField getAndCheckVersionField(IndexSchema schema)
                                                     throws SolrException

      Gets and returns the `VERSION_FIELD` from the specified schema, after verifying that it is indexed, stored, and single-valued. If any of these pre-conditions are not met, it throws a SolrException with a user suitable message indicating the problem.
      Throws:
        `SolrException`

    - #### reload

          public void reload()

    - #### getVersionField

          public SchemaField getVersionField()

    - #### lockForUpdate

          public void lockForUpdate()

    - #### unlockForUpdate

          public void unlockForUpdate()

    - #### blockUpdates

          public void blockUpdates()

    - #### unblockUpdates

          public void unblockUpdates()

    - #### getNewClock

          public long getNewClock()

    - #### getOldClock

          public long getOldClock()

    - #### updateClock

          public void updateClock(long clock)

    - #### bucket

          public VersionBucket bucket(int hash)

    - #### lookupVersion

          public Long lookupVersion(BytesRef idBytes)

    - #### getVersionFromIndex

          public Long getVersionFromIndex(BytesRef idBytes)

    - #### getMaxVersionFromIndex

          public Long getMaxVersionFromIndex(IndexSearcher searcher)
                                      throws IOException

      Throws:
        `IOException`

    - #### seedBucketsWithHighestVersion

          public void seedBucketsWithHighestVersion(long highestVersion)

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.