6 package com.vesoft.nebula.client.graph.net;
8 import com.vesoft.nebula.client.graph.data.ResultSet;
9 import com.vesoft.nebula.client.graph.exception.IOErrorException;
10 import com.vesoft.nebula.client.graph.exception.InvalidSessionException;
11 import java.io.Serializable;
12 import java.util.concurrent.atomic.AtomicBoolean;
16 private static final long serialVersionUID = -8128331485649098264L;
19 private final long sessionID;
20 private final AtomicBoolean available =
new AtomicBoolean(
true);
23 this.session = session;
41 public boolean ping() {
45 void setNoAvailable() {
46 this.available.set(
false);
50 return available.get();
58 Session getSession() {
ResultSet execute(String stmt)
Execute the query sentence.
The Session is an object that operates with nebula-graph.
synchronized boolean pingSession()
check current session is ok
synchronized ResultSet execute(String stmt)
Execute the nGql sentence.
synchronized void release()
Notifies the server that the session is no longer needed and returns the connection to the pool,...
long getSessionID()
get SessionID