-
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.
chimera: refactor PGET into abstract node
Given the fact that we would like to optimize the size of the file handles on the ".(get)" operations by not including the arguments, it now makes no sense to have the FsInode_PGET represent any concrete operation. Instead, we would like a hierarchy of get operations which have the basic read mechanism in common. This patch represents the first of a two part refactoring. It does the following: 1. Changes FsInode_PGET to an abstract node. 2. Implements the degenerate case (cursor) as a separate subclass FsInode_PCUR. 3. Changes FsInode_CRC (checksum) to be a subclass of PGET. 4. Adjusts the FsInodeType to reflect these changes. 5. Modifies the JdcbFs class accordingly. Testing: Works on both nfs 3 and nfs v4.1. Target: master Request: 2.7 Patch: http://rb.dcache.org/r/6407 Require-book: no Require-notes: no Acked-by: Tigran Changes are invisible to user. (cherry picked from commit 5e38de9) Signed-off-by: alrossi <arossi@otfrid.fnal.gov>
- Loading branch information
alrossi
committed
Jan 27, 2014
1 parent
77c1258
commit ad46dfb
Showing
5 changed files
with
85 additions
and
174 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
33 changes: 33 additions & 0 deletions
33
modules/chimera/src/main/java/org/dcache/chimera/FsInode_PCUR.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,33 @@ | ||
/* | ||
* This library is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU Library General Public License as | ||
* published by the Free Software Foundation; either version 2 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Library General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Library General Public | ||
* License along with this program (see the file COPYING.LIB for more | ||
* details); if not, write to the Free Software Foundation, Inc., | ||
* 675 Mass Ave, Cambridge, MA 02139, USA. | ||
*/ | ||
package org.dcache.chimera; | ||
|
||
/** | ||
* Cursor returns 0-byte string. | ||
* | ||
* @author arossi | ||
*/ | ||
public class FsInode_PCUR extends FsInode_PGET { | ||
|
||
public FsInode_PCUR(FileSystemProvider fs, String id) { | ||
super(fs, id, FsInodeType.PCUR); | ||
} | ||
|
||
protected String value() throws ChimeraFsException { | ||
return ""; | ||
} | ||
} |
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