public interface RelationTypeMaker
RelationType
s. RelationType can be configured to provide data verification,
better storage efficiency, and higher performance. The RelationType defines the schema for all JanusGraphRelation
s
of that type.
There are two kinds of RelationTypes: EdgeLabel
and PropertyKey
which
are defined via their builders EdgeLabelMaker
and PropertyKeyMaker
respectively. This interface just defines builder methods
common to both of them.
RelationType
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns the name of this configured relation type.
|
RelationType |
make()
Builds the configured relation type
|
RelationTypeMaker |
signature(PropertyKey... keys)
Configures the signature of this relation type.
|
String getName()
RelationTypeMaker signature(PropertyKey... keys)
Specifying the signature of a type tells the graph database to expect that relations of this type
always have or are likely to have an incident property or unidirected edge of the type included in the
signature. This allows the graph database to store such relations more compactly and retrieve them more quickly.
For instance, if all edges with label friend have a property with key createdOn, then specifying
(createdOn) as the signature for label friend allows friend edges to be stored more efficiently.
RelationType
s used in the signature must be either property out-unique keys or out-unique unidirected edge labels.
The signature is empty by default.
keys
- PropertyKey composing the signature for the configured relation type. The order is irrelevant.RelationType make()
RelationType
Copyright © 2012–2024. All rights reserved.