NeptuneDriver

class NeptuneDriver: GremlinOverriddenIdDriver

The driver used to connect to a remote Amazon Neptune instance.

Methods

addHostnames

fun addHostnames(vararg addresses: String): NeptuneDriver

Add one or more the addresses of a Gremlin Servers to the list of servers a Client will try to contact to send requests to. The address should be parseable by InetAddress.getByName(String). That's the only validation performed at this point. No connection to the host is attempted.

Parameters

Name Description
vararg addresses: String

the address(es) of Gremlin Servers to contact.

ReturnValue

Name Description
NeptuneDriver

port

fun port(port: Int): NeptuneDriver

Set the port for the Neptune Gremlin server. Default port number is 8182.

Parameters

Name Description
port: Int

the port number e.g. 8182

ReturnValue

Name Description
NeptuneDriver

keyCertChainFile

fun keyCertChainFile(keyChainFile: String): NeptuneDriver

Sets the certificate to use by the Cluster.

Parameters

Name Description
keyChainFile: String

The X.509 certificate chain file in PEM format.

ReturnValue

Name Description
NeptuneDriver

connect

fun connect(): NeptuneDriver

Connects to the graph database with the given configuration. See Amazon Documentation.

ReturnValue

Name Description
NeptuneDriver

close

fun close()

Attempts to close the graph database connection and resources.

ReturnValue

Name Description
Unit

createVertex

protected fun createVertex(v: NewNodeBuilder): Vertex

Given a NewNodeBuilder, creates a Vertex and translates the object's field properties to key-value pairs on the Vertex object. This is then added to this driver's Graph.

Parameters

Name Description
v: NewNodeBuilder

the NewNodeBuilder to translate into a Vertex.

ReturnValue

Name Description
Vertex

the newly created Vertex.