MongoDB::_ServerSession - MongoDB Server Session object
version v1.999.0
use MongoDB::_ServerSession; my $server_session = MongoDB::_ServerSession->new;
This class encapsulates the session id and last use of the session. For use with MongoDB::ClientSession for session based operations.
$server_session->session_id;
Returns the session id for this server session as a BSON::Bytes object containing a binary UUID V4. For lower network usage, if not provided on initialisation this class will generate a new UUID instead of consulting the server for a new session id.
$server_session->last_use;
Returns the unix time that this server session was last used. Used for checking expiry of a server session. If undefined, then the session has (probably) not been used on the server.
$server_session->transaction_id
Returns the current transaction id for this server session. This is a ratcheted incrementing ID number, which when combined with the session id allows for retrying transactions in the correct order.
$server_session->update_last_use;
Updates the value of "last_use" to the current unix time.
David Golden <david@mongodb.com>
Rassi <rassi@mongodb.com>
Mike Friedman <friedo@friedo.com>
Kristina Chodorow <k.chodorow@gmail.com>
Florian Ragwitz <rafl@debian.org>
This software is Copyright (c) 2018 by MongoDB, Inc.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
To install MongoDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MongoDB
CPAN shell
perl -MCPAN -e shell install MongoDB
For more information on module installation, please visit the detailed CPAN module installation guide.