org.apache.solr.update
Class VersionInfo

java.lang.Object
  extended by org.apache.solr.update.VersionInfo

public class VersionInfo
extends Object


Field Summary
static String VERSION_FIELD
           
 
Constructor Summary
VersionInfo(UpdateLog ulog, int nBuckets)
           
 
Method Summary
 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 getNewClock()
           
 long getOldClock()
           
 SchemaField getVersionField()
           
 Long getVersionFromIndex(BytesRef idBytes)
           
 void lockForUpdate()
           
 Long lookupVersion(BytesRef idBytes)
           
 void reload()
           
 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)


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