driver-legacy/src/main/com/mongodb/MongoClient.java
public ClientSession startSession(final ClientSessionOptions options) {
        ClientSession clientSession = createClientSession(notNull("options", options));
        if (clientSession == null) {
            throw new MongoClientException("Sessions are not supported by the MongoDB cluster to which this client is connected");
        }
        return clientSession;
    }
public ClientSession startSession(final ClientSessionOptions options) {
        ClientSession clientSession = createClientSession(notNull("options", options));
        if (clientSession == null) {
            throw new MongoClientException("Sessions are not supported by the MongoDB cluster to which this client is connected");
        }
        return clientSession;
    }
Creates a client session.

@param options the options for the client session
@return the client session
@throws MongoClientException if the MongoDB cluster to which this client is connected does not support sessions
@mongodb.server.release 3.6
@since 3.6