NebulaGraph Java Client  release-3.6
SessionPool Class Reference
+ Inheritance diagram for SessionPool:
+ Collaboration diagram for SessionPool:

Public Member Functions

 SessionPool (SessionPoolConfig poolConfig)
 
boolean init ()
 init the SessionPool this function is moved into SessionPool's constructor, no need to call it manually.
 
ResultSet execute (String stmt) throws IOErrorException, ClientServerIncompatibleException, AuthFailedException, BindSpaceFailedException
 Execute the nGql sentence. More...
 
ResultSet execute (String stmt, Map< String, Object > parameterMap) throws ClientServerIncompatibleException, AuthFailedException, IOErrorException, BindSpaceFailedException
 Execute the nGql sentence with parameter. More...
 
void close ()
 close the session pool
 
boolean isActive ()
 if the SessionPool has been initialized
 
boolean isClosed ()
 if the SessionPool is closed
 
int getSessionNums ()
 get the number of all Session
 
int getIdleSessionNums ()
 get the number of idle Session
 
HostAddress getAddress ()
 

Public Attributes

CopyOnWriteArrayList< NebulaSessionsessionList = new CopyOnWriteArrayList<>()
 
AtomicInteger idleSessionSize = new AtomicInteger(0)
 
AtomicBoolean hasInit = new AtomicBoolean(false)
 
AtomicBoolean isClosed = new AtomicBoolean(false)
 

Detailed Description

Definition at line 31 of file SessionPool.java.

Member Function Documentation

◆ execute() [1/2]

Execute the nGql sentence.

Parameters
stmtThe nGql sentence. such as insert ngql INSERT VERTEX person(name) VALUES "Tom":("Tom");
Returns
The ResultSet

Definition at line 145 of file SessionPool.java.

+ Here is the call graph for this function:

◆ execute() [2/2]

ResultSet execute ( String  stmt,
Map< String, Object >  parameterMap 
) throws ClientServerIncompatibleException, AuthFailedException, IOErrorException, BindSpaceFailedException

Execute the nGql sentence with parameter.

Parameters
stmtThe nGql sentence.
parameterMapThe nGql parameter map
Returns
The ResultSet

Definition at line 209 of file SessionPool.java.


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