-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nfs: prepare code for removal of redundant stateid4 class
Motivation: During split and refactoring of nfs4j code for backwar compatibility with older dCache version (2.6!) we have kept the org.dcache.chimera.nfs.v4.xdr.stateid class. Sommehot it have survived 10 years :). Modification: Update code to: - prepare pools to accept both stateid classes. - pools always sent stateid from nfs4j - doors send legacy stateid, but accept both. With with dcache 11.0 the legacy classes can be dropped. Result: prepare code for legacy class removal. Acked-by: Paul Millar Target: master Require-book: no Require-notes: no
- Loading branch information
Showing
6 changed files
with
60 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
modules/dcache-nfs/src/main/java/org/dcache/chimera/nfsv41/common/LegacyUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.dcache.chimera.nfsv41.common; | ||
|
||
import org.dcache.nfs.v4.xdr.stateid4; | ||
|
||
/** | ||
* Utility class to support removal of legacy stateid class. | ||
*/ | ||
@Deprecated(forRemoval = true) | ||
public class LegacyUtils { | ||
|
||
private LegacyUtils() { | ||
// no instance allowed | ||
} | ||
|
||
public static stateid4 toStateid(Object stateObject) { | ||
stateid4 stateid; | ||
if (stateObject instanceof stateid4) { | ||
stateid = (stateid4) stateObject; | ||
} else { | ||
org.dcache.chimera.nfs.v4.xdr.stateid4 legacyStateid | ||
= (org.dcache.chimera.nfs.v4.xdr.stateid4) stateObject; | ||
stateid = new stateid4(legacyStateid.other, legacyStateid.seqid.value); | ||
} | ||
return stateid; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters