@ Override public void close ( ) { if ( isClosed ) { return ; } TransactionOLTP localTx = localOLTPTransactionContainer . get ( ) ; if ( localTx != null ) { localTx . close ( ErrorMessage . SESSION_CLOSED . getMessage ( keyspace ( ) ) ) ; localOLTPTransactionContainer . set ( null ) ; } if ( this . onClose != null ) { this . onClose . accept ( this ) ; } isClosed = true ; }
Close JanusGraph it will not be possible to create new transactions using current instance of Session . This closes current session and local transaction invoking callback function if one is set .