Commit 20a91599 authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan
Browse files

nfs4: add javadoc to NFSv41Session constructor

and rename some fields to make them more obvious.

Acked-by: Lea Morschel
Acked-by: Paul Millar
Target: master
parent c131ddde
/* /*
* Copyright (c) 2009 - 2018 Deutsches Elektronen-Synchroton, * Copyright (c) 2009 - 2020 Deutsches Elektronen-Synchroton,
* Member of the Helmholtz Association, (DESY), HAMBURG, GERMANY * Member of the Helmholtz Association, (DESY), HAMBURG, GERMANY
* *
* This library is free software; you can redistribute it and/or modify * This library is free software; you can redistribute it and/or modify
...@@ -39,16 +39,25 @@ public class NFSv41Session { ...@@ -39,16 +39,25 @@ public class NFSv41Session {
private final int _maxOps; private final int _maxOps;
private final int _maxCbOps; private final int _maxCbOps;
private final int _cbReplyCacheSize; private final int _maxCbRequests;
private final Set<SessionConnection> _boundConnections; private final Set<SessionConnection> _boundConnections;
public NFSv41Session(NFS4Client client, sessionid4 sessionid, int replyCacheSize, int cbReplyCacheSize, int maxOps, int maxCbOps) { /**
* Create new session for the given client.
* @param client The client that owns this session.
* @param sessionid The session id uniquely identifying session on the server.
* @param maxRequests The maximum number of concurrent requests.
* @param maxCbRequests The maximum number of concurrent callback requests.
* @param maxOps The maximum number of compound operations per requests.
* @param maxCbOps The maximum number of compound operations per callback requests.
*/
public NFSv41Session(NFS4Client client, sessionid4 sessionid, int maxRequests, int maxCbRequests, int maxOps, int maxCbOps) {
_client = client; _client = client;
_slots = new SessionSlot[replyCacheSize]; _slots = new SessionSlot[maxRequests];
_session = sessionid; _session = sessionid;
_maxOps = maxOps; _maxOps = maxOps;
_maxCbOps = maxCbOps; _maxCbOps = maxCbOps;
_cbReplyCacheSize = cbReplyCacheSize; _maxCbRequests = maxCbRequests;
_boundConnections = new HashSet<>(); _boundConnections = new HashSet<>();
} }
...@@ -69,8 +78,7 @@ public class NFSv41Session { ...@@ -69,8 +78,7 @@ public class NFSv41Session {
} }
public int getCbHighestSlot() { public int getCbHighestSlot() {
// FIXME: currently we do not support call-backs, but have to keep client happy return _maxCbRequests - 1;
return _cbReplyCacheSize - 1;
} }
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment