NebulaGraph Java Client
release-3.6
|
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< NebulaSession > | sessionList = new CopyOnWriteArrayList<>() |
AtomicInteger | idleSessionSize = new AtomicInteger(0) |
AtomicBoolean | hasInit = new AtomicBoolean(false) |
AtomicBoolean | isClosed = new AtomicBoolean(false) |
Definition at line 31 of file SessionPool.java.
ResultSet execute | ( | String | stmt | ) | throws IOErrorException, ClientServerIncompatibleException, AuthFailedException, BindSpaceFailedException |
Execute the nGql sentence.
stmt | The nGql sentence. such as insert ngql INSERT VERTEX person(name) VALUES "Tom":("Tom"); |
Definition at line 145 of file SessionPool.java.
ResultSet execute | ( | String | stmt, |
Map< String, Object > | parameterMap | ||
) | throws ClientServerIncompatibleException, AuthFailedException, IOErrorException, BindSpaceFailedException |
Execute the nGql sentence with parameter.
stmt | The nGql sentence. |
parameterMap | The nGql parameter map |
Definition at line 209 of file SessionPool.java.