Commit 06151918 authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan
Browse files

nfs4: make extended NFSv4StateHandler constructor public

Motivation:
the NFSv4StateHandler(leaseTime, instanceId, clientStore)  constructor
can be used by NFS servers to control NFSv4StateHandler instance
creation. As extended constructor is package protected, thus control is
unavailable to other modules.

Modification:
make extended NFSv4StateHandler constructor public. Updated javadoc.

Result:
more control on how instance of NFSv4StateHandler created.

Acked-by: Paul Millar
Target: master
parent 20e67354
......@@ -92,7 +92,15 @@ public class NFSv4StateHandler {
this(NFSv4Defaults.NFS4_LEASE_TIME, 0, new EphemeralClientRecoveryStore());
}
NFSv4StateHandler(long leaseTime, int instanceId, ClientRecoveryStore clientStore) {
/**
* Create NFSv4 state handler with given lease time, instance id and client store.
* The {@code instanceId} should uniquely identify this state handler.
*
* @param leaseTime state lease time in seconds.
* @param instanceId the nfs server instance id within deployment.
* @param clientStore store used by state handler to keep track of valid clients.
*/
public NFSv4StateHandler(long leaseTime, int instanceId, ClientRecoveryStore clientStore) {
_leaseTime = TimeUnit.SECONDS.toMillis(leaseTime);
_clientsByServerId = new Cache<>("NFSv41 clients", 5000, Long.MAX_VALUE,
_leaseTime * 2,
......
Supports Markdown
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