public class VersionInfo extends Object
Constructor and Description |
---|
VersionInfo(UpdateLog ulog,
int nBuckets) |
Modifier and Type | Method and Description |
---|---|
void |
blockUpdates() |
VersionBucket |
bucket(int hash) |
static SchemaField |
getAndCheckVersionField(IndexSchema schema)
Gets and returns the
CommonParams.VERSION_FIELD from the specified
schema, after verifying that it is indexed, stored, and single-valued. |
Long |
getMaxVersionFromIndex(IndexSearcher searcher)
Returns the highest version from the index, or 0L if no versions can be found in the index.
|
long |
getNewClock() |
long |
getOldClock() |
int |
getVersionBucketLockTimeoutMs() |
SchemaField |
getVersionField() |
Long |
getVersionFromIndex(BytesRef idBytes)
Returns the latest version from the index, searched by the given id (bytes) as seen from the realtime searcher.
|
void |
lockForUpdate() |
Long |
lookupVersion(BytesRef idBytes) |
void |
reload() |
void |
seedBucketsWithHighestVersion(long highestVersion) |
void |
unblockUpdates() |
void |
unlockForUpdate() |
void |
updateClock(long clock) |
public VersionInfo(UpdateLog ulog, int nBuckets)
public static SchemaField getAndCheckVersionField(IndexSchema schema) throws SolrException
CommonParams.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.SolrException
public int getVersionBucketLockTimeoutMs()
public void reload()
public SchemaField getVersionField()
public void lockForUpdate()
public void unlockForUpdate()
public void blockUpdates()
public void unblockUpdates()
public long getNewClock()
public long getOldClock()
public void updateClock(long clock)
public VersionBucket bucket(int hash)
public Long getVersionFromIndex(BytesRef idBytes)
public Long getMaxVersionFromIndex(IndexSearcher searcher) throws IOException
IOException
public void seedBucketsWithHighestVersion(long highestVersion)
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.