public class FullyInlineURIIV<V extends BigdataURI> extends AbstractInlineIV<V,org.openrdf.model.URI> implements IInlineUnicode, org.openrdf.model.URI
URIs. All information is inlined. This
class is mainly targeted at inlining at fully inlining URIs in scale-out
(which can be an attractive option).flags| Constructor and Description |
|---|
FullyInlineURIIV(org.openrdf.model.URI uri) |
FullyInlineURIIV(org.openrdf.model.URI uri,
int byteLength) |
| Modifier and Type | Method and Description |
|---|---|
int |
_compareTo(IV o)
Compare two
IVs having the same intrinsic datatype. |
V |
asValue(LexiconRelation lex)
If the value is not already cached, then inflate an inline RDF value to a
BigdataValue and cache it on a private field. |
int |
byteLength()
The byte length of the encoded
IV. |
IV<V,org.openrdf.model.URI> |
clone(boolean clearCache)
Return a copy of this
IV. |
boolean |
equals(Object o)
Return true iff the two
IVs are the same point in the same value
space. |
org.openrdf.model.URI |
getInlineValue()
Return the Java
Object corresponding to the inline value. |
String |
getLocalName()
Implements
URI.getLocalName(). |
String |
getNamespace()
Implements
URI.getNamespace(). |
int |
hashCode()
Return the hash code of the
URI's string value (per the openrdf
API). |
boolean |
needsMaterialization()
Because we this is a fully inlined URI, we do not need the
materialized URI to answer the URI interface methods.
|
void |
setByteLength(int byteLength)
Cache the byteLength on the
IV. |
String |
stringValue()
Implements
Value.stringValue(). |
String |
toString() |
isInlinecompareTo, encode, flags, getDTE, getDTE, getDTEX, getInternalValueTypeEnum, getValue, getValueCache, getVTE, getVTE, hasValue, isBigNumeric, isBNode, isExtension, isExtension, isFixedNumeric, isFloatingPointNumeric, isInline, isLiteral, isNullIV, isNumeric, isResource, isSignedNumeric, isStatement, isUnsignedNumeric, isURI, isVocabulary, setValue, toFlagspublic FullyInlineURIIV(org.openrdf.model.URI uri)
public FullyInlineURIIV(org.openrdf.model.URI uri,
int byteLength)
public IV<V,org.openrdf.model.URI> clone(boolean clearCache)
IVCacheIV.
Note: This method exists to defeat the hard reference from the IV
to the cached BigdataValue in order to avoid a memory leak when
the IV is used as the key in a weak value cache whose value is
the BigdataValue. Therefore, certain IV implementations
MAY return this when they are used for limited collections. The
vocabulary IVs are the primary example. For the same reason, we do not
need to recursively break the link from the IV to the
BigdataValue for IVs which embed other IVs.
clone in interface IVCache<V extends BigdataURI,org.openrdf.model.URI>clearCache - When true the cached reference (if any) will NOT
be set on the copy.(Thread-local
cache combined with unbounded thread pools causes effective memory
leak)public final org.openrdf.model.URI getInlineValue()
IVObject corresponding to the inline value.getInlineValue in interface IV<V extends BigdataURI,org.openrdf.model.URI>Object.public final String toString()
public V asValue(LexiconRelation lex)
IVCacheBigdataValue and cache it on a private field.
Note: Query plans are responsible for ensuring that IVs have been
materialized before operators are evaluated which invoke this method.
This pattern ensures that efficient batch operators are used to
materialize Values, and thereby avoids heavy RMI overhead in
scale-out, and provides operators which use IVCache.getValue() with a
simple method signature which does not require access to the lexicon.
Query plans are also responsible for dropping variables once they are no
longer needed or, in the case of large values and BLOBs, dropping the
cached BigdataValue when possible in order to avoid excess
network and heap overhead.
asValue in interface IVCache<V extends BigdataURI,org.openrdf.model.URI>lex - The lexicon relation (this is required in order to access the
BigdataValueFactory for the namespace associated with
lexicon when we materialize an inline IV).BigdataValue.public boolean equals(Object o)
AbstractIVIVs are the same point in the same value
space. Points in different value spaces (as identified by different
datatype URIs) are NOT equal even if they have the same value in the
corresponding primitive data type.
Note: The IV implementations typically DO NOT compare equals()
with BigdataValues. Therefore you MUST NOT mix IVs and
BigdataValues in the keys of a map or the values of a set.
equals in interface org.openrdf.model.URIequals in class AbstractIV<V extends BigdataURI,org.openrdf.model.URI>public int hashCode()
URI's string value (per the openrdf
API).hashCode in interface org.openrdf.model.URIhashCode in class AbstractIV<V extends BigdataURI,org.openrdf.model.URI>public int byteLength()
IVIV.byteLength in interface IV<V extends BigdataURI,org.openrdf.model.URI>public final void setByteLength(int byteLength)
IInlineUnicodeIV.setByteLength in interface IInlineUnicodebyteLength - The byteLength.public int _compareTo(IV o)
AbstractIVIVs having the same intrinsic datatype._compareTo in class AbstractIV<V extends BigdataURI,org.openrdf.model.URI>public boolean needsMaterialization()
needsMaterialization in interface IV<V extends BigdataURI,org.openrdf.model.URI>public String stringValue()
Value.stringValue().stringValue in interface org.openrdf.model.Valuepublic String getLocalName()
URI.getLocalName().getLocalName in interface org.openrdf.model.URIpublic String getNamespace()
URI.getNamespace().getNamespace in interface org.openrdf.model.URICopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.