T - public class SystemKeyspace<T extends org.apache.tinkerpop.gremlin.structure.Graph> extends Object
Manages the system keyspace.
Used to populate the system ontology the first time the system keyspace is created.
Used to populate the system keyspace with all newly create keyspaces as a user opens them. We have no way to determining whether a keyspace with a given name already exists or not. We maintain the list in our Grakn system keyspace. An element is added to that list when there is an attempt to create a graph from a factory bound to the keyspace name. The list is simply the instances of the system entity type 'keyspace'. Nothing is ever removed from that list. The set of known keyspaces is maintained in a static map so we don't connect to the system keyspace every time a factory produces a new graph. That means that we can't have several different factories (e.g. Titan and in-memory Tinkerpop) at the same time sharing keyspace names. We can't identify the factory builder by engineUrl and config because we don't know what's inside the config, which is residing remotely at the engine!
| Modifier and Type | Field and Description |
|---|---|
static TypeLabel |
KEYSPACE_ENTITY |
static TypeLabel |
KEYSPACE_RESOURCE |
protected org.slf4j.Logger |
LOG |
static String |
SYSTEM_GRAPH_NAME |
static String |
SYSTEM_ONTOLOGY_FILE |
static TypeLabel |
SYSTEM_VERSION |
| Constructor and Description |
|---|
SystemKeyspace(ai.grakn.factory.InternalFactory<T> factory) |
public static final String SYSTEM_GRAPH_NAME
public static final String SYSTEM_ONTOLOGY_FILE
public static final TypeLabel KEYSPACE_ENTITY
public static final TypeLabel KEYSPACE_RESOURCE
public static final TypeLabel SYSTEM_VERSION
protected final org.slf4j.Logger LOG
public SystemKeyspace(ai.grakn.factory.InternalFactory<T> factory)
Copyright © 2017 Grakn Labs Ltd. All rights reserved.