public static final class DocValues.SourceCache.DirectSourceCache extends DocValues.SourceCache
DocValues
instance cache implementation that holds a
DocValues.Source
a member variable.
If a DocValues.SourceCache.DirectSourceCache
instance is closed or invalidated the cached
reference are simply set to null
DocValues.SourceCache.DirectSourceCache
Constructor and Description |
---|
DocValues.SourceCache.DirectSourceCache()
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
invalidate(DocValues values)
Atomically invalidates the cached
DocValues.Source
instances if any and empties the cache. |
DocValues.Source |
load(DocValues values)
Atomically loads a
DocValues.Source into the cache from the given
DocValues and returns it iff no other DocValues.Source has already
been cached. |
DocValues.Source |
loadDirect(DocValues values)
Atomically loads a
direct source into the per-thread cache from the given
DocValues and returns it iff no other direct source has already
been cached. |
close
public DocValues.SourceCache.DirectSourceCache()
public DocValues.Source load(DocValues values) throws IOException
DocValues.SourceCache
DocValues.Source
into the cache from the given
DocValues
and returns it iff no other DocValues.Source
has already
been cached. Otherwise the cached source is returned.
This method will not return null
load
in class DocValues.SourceCache
IOException
public void invalidate(DocValues values)
DocValues.SourceCache
DocValues.Source
instances if any and empties the cache.invalidate
in class DocValues.SourceCache
public DocValues.Source loadDirect(DocValues values) throws IOException
DocValues.SourceCache
direct source
into the per-thread cache from the given
DocValues
and returns it iff no other direct source
has already
been cached. Otherwise the cached source is returned.
This method will not return null
loadDirect
in class DocValues.SourceCache
IOException
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.