NebulaGraph Java Client 5.0.0
Loading...
Searching...
No Matches
NebulaClient Class Reference

Client to connect to NebulaGraph and send request to NebulaGraph. More...

+ Inheritance diagram for NebulaClient:
+ Collaboration diagram for NebulaClient:

Classes

class  Builder
 

Public Member Functions

ResultSet execute (String gql) throws IOErrorException
 
synchronized ResultSet execute (String gql, long requestTimeout) throws IOErrorException
 
long getSessionId ()
 get the SessionId of the Client
 
String getHost ()
 get the NebulaGraph host address that this client is connecting to.
 
long getConnectTimeoutMills ()
 
long getRequestTimeoutMills ()
 
long getScanParallel ()
 
synchronized boolean ping (long timeoutMs)
 ping the NebulaGraph server
 
boolean ping ()
 
synchronized void close ()
 release and close the connection with NebulaGraph server.
 
boolean isClosed ()
 get the Client status
 
ScanNodeResultIterator scanNode (String graphName, String nodeType)
 
ScanNodeResultIterator scanNode (String graphName, String nodeType, List< String > returnProperties)
 
ScanNodeResultIterator scanNode (String graphName, String nodeType, List< String > returnProperties, int batchSize)
 scan the data of specific nodeType.
 
ScanNodeResultIterator scanNode (String graphName, String nodeType, List< String > returnProperties, int part, int batchSize)
 scan the data of specific nodeType the result will contain primary key and specific return properties.
 
ScanNodeResultIterator scanNode (String graphName, String nodeType, List< String > returnProperties, List< Integer > parts, int batchSize)
 scan the data of specific nodeType the result will contain primary key and specific return properties.
 
ScanEdgeResultIterator scanEdge (String graphName, String edgeType)
 
ScanEdgeResultIterator scanEdge (String graphName, String edgeType, List< String > returnProperties)
 
ScanEdgeResultIterator scanEdge (String graphName, String edgeType, List< String > returnProperties, int batchSize)
 scan the data of specific edgeType the result will contain src node's primary key, dst node's primary key, edge's all property.
 
ScanEdgeResultIterator scanEdge (String graphName, String edgeType, List< String > returnProperties, int part, int batchSize)
 scan the data of specific edgeType
 
ScanEdgeResultIterator scanEdge (String graphName, String edgeType, List< String > returnProperties, List< Integer > parts, int batchSize)
 scan the data of specific edgeType
 

Static Public Member Functions

static Builder builder (String addresses, String userName, String password)
 
static Builder builder (String addresses, String userName)
 

Detailed Description

Client to connect to NebulaGraph and send request to NebulaGraph.

Definition at line 39 of file NebulaClient.java.

Member Function Documentation

◆ builder() [1/2]

static Builder builder ( String  addresses,
String  userName 
)
static

Definition at line 53 of file NebulaClient.java.

◆ builder() [2/2]

static Builder builder ( String  addresses,
String  userName,
String  password 
)
static

Definition at line 49 of file NebulaClient.java.

◆ close()

synchronized void close ( )

release and close the connection with NebulaGraph server.

Definition at line 128 of file NebulaClient.java.

◆ execute() [1/2]

ResultSet execute ( String  gql) throws IOErrorException

Definition at line 65 of file NebulaClient.java.

◆ execute() [2/2]

synchronized ResultSet execute ( String  gql,
long  requestTimeout 
) throws IOErrorException

Definition at line 69 of file NebulaClient.java.

◆ getConnectTimeoutMills()

long getConnectTimeoutMills ( )

Definition at line 92 of file NebulaClient.java.

◆ getHost()

String getHost ( )

get the NebulaGraph host address that this client is connecting to.

Returns
NebulaGraph server host.

Definition at line 88 of file NebulaClient.java.

+ Here is the caller graph for this function:

◆ getRequestTimeoutMills()

long getRequestTimeoutMills ( )

Definition at line 96 of file NebulaClient.java.

◆ getScanParallel()

long getScanParallel ( )

Definition at line 100 of file NebulaClient.java.

◆ getSessionId()

long getSessionId ( )

get the SessionId of the Client

Returns
session id

Definition at line 79 of file NebulaClient.java.

◆ isClosed()

boolean isClosed ( )

get the Client status

@reuturn true if client is closed

Definition at line 148 of file NebulaClient.java.

◆ ping() [1/2]

boolean ping ( )

Definition at line 121 of file NebulaClient.java.

◆ ping() [2/2]

synchronized boolean ping ( long  timeoutMs)

ping the NebulaGraph server

Parameters
timeoutMstimeout, unit: ms
Returns
true when client can ping server succeed.

Definition at line 111 of file NebulaClient.java.

+ Here is the call graph for this function:

◆ scanEdge() [1/5]

ScanEdgeResultIterator scanEdge ( String  graphName,
String  edgeType 
)

Definition at line 340 of file NebulaClient.java.

◆ scanEdge() [2/5]

ScanEdgeResultIterator scanEdge ( String  graphName,
String  edgeType,
List< String >  returnProperties 
)

Definition at line 345 of file NebulaClient.java.

◆ scanEdge() [3/5]

ScanEdgeResultIterator scanEdge ( String  graphName,
String  edgeType,
List< String >  returnProperties,
int  batchSize 
)

scan the data of specific edgeType the result will contain src node's primary key, dst node's primary key, edge's all property.

Parameters
graphNameNebulaGraph name
edgeTypeedge type name
returnPropertiesthe property list to scan, if list is empty, then the result will just contain src node's primary key and dst node's primary key
batchSizethe data size for one request for one part, the ScanEdgeResultIterator.next() will return at most batchSize edge records
Returns
ScanEdgeResultIterator

Definition at line 370 of file NebulaClient.java.

◆ scanEdge() [4/5]

ScanEdgeResultIterator scanEdge ( String  graphName,
String  edgeType,
List< String >  returnProperties,
int  part,
int  batchSize 
)

scan the data of specific edgeType

Parameters
graphNameNebulaGraph name
edgeTypeedge type name
returnPropertiesthe property list to scan, if list is empty, then the result will just contain src node's primary key and dst node's primary key
partgraph part id
batchSizethe data size for one request for one part, the ScanEdgeResultIterator.next() will return at most batchSize edge records
Returns
ScanEdgeResultIterator

Definition at line 397 of file NebulaClient.java.

◆ scanEdge() [5/5]

ScanEdgeResultIterator scanEdge ( String  graphName,
String  edgeType,
List< String >  returnProperties,
List< Integer >  parts,
int  batchSize 
)

scan the data of specific edgeType

Parameters
graphNameNebulaGraph name
edgeTypeedge type name
returnPropertiesthe property list to scan, if list is empty, then the result will just contain src node's primary key and dst node's primary key
partspart list to scan
batchSizethe data size for one request for one part, the ScanEdgeResultIterator.next() will return at most batchSize edge records
Returns
ScanEdgeResultIterator

Definition at line 429 of file NebulaClient.java.

◆ scanNode() [1/5]

ScanNodeResultIterator scanNode ( String  graphName,
String  nodeType 
)

Definition at line 188 of file NebulaClient.java.

◆ scanNode() [2/5]

ScanNodeResultIterator scanNode ( String  graphName,
String  nodeType,
List< String >  returnProperties 
)

Definition at line 193 of file NebulaClient.java.

◆ scanNode() [3/5]

ScanNodeResultIterator scanNode ( String  graphName,
String  nodeType,
List< String >  returnProperties,
int  batchSize 
)

scan the data of specific nodeType.

the result will contain all property of nodeType.

Parameters
graphNameNebulaGraph name
nodeTypenode type name
returnPropertiesthe property list to scan, if list is empty, then the result just contain primary key.
batchSizethe data size for one request for one part, the ScanNodeResultIterator.next() will return at most batchSize node records
Returns
ScanNodeResultIterator

Definition at line 218 of file NebulaClient.java.

◆ scanNode() [4/5]

ScanNodeResultIterator scanNode ( String  graphName,
String  nodeType,
List< String >  returnProperties,
int  part,
int  batchSize 
)

scan the data of specific nodeType the result will contain primary key and specific return properties.

Parameters
graphNameNebulaGraph name
nodeTypenode type name
returnPropertiesthe property list to scan, if list is empty, then the result just contain primary key.
partgraph part id
batchSizethe data size for one request for one part, the ScanNodeResultIterator.next() will return at most batchSize node records
Returns
ScanNodeResultIterator

Definition at line 244 of file NebulaClient.java.

◆ scanNode() [5/5]

ScanNodeResultIterator scanNode ( String  graphName,
String  nodeType,
List< String >  returnProperties,
List< Integer >  parts,
int  batchSize 
)

scan the data of specific nodeType the result will contain primary key and specific return properties.

Parameters
graphNameNebulaGraph name
nodeTypenode type name
returnPropertiesthe property list to scan, if list is empty, then the result just contain primary key.
partslist of graph part id
batchSizethe data size for one request for one part, the ScanNodeResultIterator.next() will return at most batchSize node records
Returns
ScanNodeResultIterator

Definition at line 268 of file NebulaClient.java.


The documentation for this class was generated from the following file: