code: void invalidate() {
          TransactionOLTP localTx = localOLTPTransactionContainer.get();
          if (localTx != null) {
              localTx.close(ErrorMessage.SESSION_CLOSED.getMessage(keyspace()));
              localOLTPTransactionContainer.set(null);
          }
          isClosed = true;
      }
docs: Method used by SessionFactory to invalidate current Session when the keyspace (used by current session) is deleted.
  This closes current session and local transaction, without invoking callback function.