Package org.apache.solr.update
Class VersionInfo
- java.lang.Object
- 
- org.apache.solr.update.VersionInfo
 
- 
 public class VersionInfo extends Object 
- 
- 
Constructor SummaryConstructors Constructor Description VersionInfo(UpdateLog ulog, int nBuckets)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidblockUpdates()VersionBucketbucket(int hash)static SchemaFieldgetAndCheckVersionField(IndexSchema schema)Gets and returns theCommonParams.VERSION_FIELDfrom the specified schema, after verifying that it is indexed, stored, and single-valued.LonggetMaxVersionFromIndex(org.apache.lucene.search.IndexSearcher searcher)Returns the highest version from the index, or 0L if no versions can be found in the index.longgetNewClock()longgetOldClock()intgetVersionBucketLockTimeoutMs()SchemaFieldgetVersionField()LonggetVersionFromIndex(org.apache.lucene.util.BytesRef idBytes)Returns the latest version from the index, searched by the given id (bytes) as seen from the realtime searcher.voidlockForUpdate()LonglookupVersion(org.apache.lucene.util.BytesRef idBytes)voidreload()voidseedBucketsWithHighestVersion(long highestVersion)voidunblockUpdates()voidunlockForUpdate()voidupdateClock(long clock)
 
- 
- 
- 
Constructor Detail- 
VersionInfopublic VersionInfo(UpdateLog ulog, int nBuckets) 
 
- 
 - 
Method Detail- 
getAndCheckVersionFieldpublic static SchemaField getAndCheckVersionField(IndexSchema schema) throws org.apache.solr.common.SolrException Gets and returns theCommonParams.VERSION_FIELDfrom 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:
- org.apache.solr.common.SolrException
 
 - 
getVersionBucketLockTimeoutMspublic int getVersionBucketLockTimeoutMs() 
 - 
reloadpublic void reload() 
 - 
getVersionFieldpublic SchemaField getVersionField() 
 - 
lockForUpdatepublic void lockForUpdate() 
 - 
unlockForUpdatepublic void unlockForUpdate() 
 - 
blockUpdatespublic void blockUpdates() 
 - 
unblockUpdatespublic void unblockUpdates() 
 - 
getNewClockpublic long getNewClock() 
 - 
getOldClockpublic long getOldClock() 
 - 
updateClockpublic void updateClock(long clock) 
 - 
bucketpublic VersionBucket bucket(int hash) 
 - 
lookupVersionpublic Long lookupVersion(org.apache.lucene.util.BytesRef idBytes) 
 - 
getVersionFromIndexpublic Long getVersionFromIndex(org.apache.lucene.util.BytesRef idBytes) Returns the latest version from the index, searched by the given id (bytes) as seen from the realtime searcher. Returns null if no document can be found in the index for the given id.
 - 
getMaxVersionFromIndexpublic Long getMaxVersionFromIndex(org.apache.lucene.search.IndexSearcher searcher) throws IOException Returns the highest version from the index, or 0L if no versions can be found in the index.- Throws:
- IOException
 
 - 
seedBucketsWithHighestVersionpublic void seedBucketsWithHighestVersion(long highestVersion) 
 
- 
 
-