EMMA Coverage Report (generated Mon Aug 23 17:21:34 CEST 2010)
[all classes][diskCacheV111.vehicles]

COVERAGE SUMMARY FOR SOURCE FILE [PnfsGetStorageInfoMessage.java]

nameclass, %method, %block, %line, %
PnfsGetStorageInfoMessage.java0%   (0/1)0%   (0/8)0%   (0/94)0%   (0/25)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PnfsGetStorageInfoMessage0%   (0/1)0%   (0/8)0%   (0/94)0%   (0/25)
PnfsGetStorageInfoMessage (): void 0%   (0/1)0%   (0/14)0%   (0/5)
PnfsGetStorageInfoMessage (PnfsId): void 0%   (0/1)0%   (0/15)0%   (0/5)
PnfsGetStorageInfoMessage (Set): void 0%   (0/1)0%   (0/15)0%   (0/5)
getRequestedAttributes (): Set 0%   (0/1)0%   (0/14)0%   (0/5)
getStorageInfo (): StorageInfo 0%   (0/1)0%   (0/14)0%   (0/1)
resolve (): boolean 0%   (0/1)0%   (0/3)0%   (0/1)
setFileAttributes (FileAttributes): void 0%   (0/1)0%   (0/12)0%   (0/4)
setResolve (boolean): void 0%   (0/1)0%   (0/7)0%   (0/3)

1// $Id: PnfsGetStorageInfoMessage.java,v 1.7 2006-04-11 09:47:53 tigran Exp $
2package diskCacheV111.vehicles;
3 
4import java.util.Set;
5 
6import diskCacheV111.util.*;
7import org.dcache.vehicles.FileAttributes;
8import org.dcache.namespace.FileAttribute;
9 
10import static org.dcache.namespace.FileAttribute.*;
11 
12public class PnfsGetStorageInfoMessage extends PnfsGetFileMetaDataMessage {
13 
14    private StorageInfo  _storageInfo = null ;
15    private boolean      _followLinks = true;
16 
17    private static final long serialVersionUID = -2574949600859502380L;
18 
19    public PnfsGetStorageInfoMessage()
20    {
21        super();
22        _attributes.add(STORAGEINFO);
23    }
24 
25    public PnfsGetStorageInfoMessage(Set<FileAttribute> attr)
26    {
27        super(attr);
28        _attributes.add(STORAGEINFO);
29    }
30 
31    public PnfsGetStorageInfoMessage(PnfsId pnfsId)
32    {
33        super(pnfsId);
34        _attributes.add(STORAGEINFO);
35    }
36 
37    /* To ensure backwards compatibility with pre 1.9.6 clients, we
38     * explicitly add attributes compatible with
39     * PnfsGetStorageInfoMessage to the set of requested attributes if
40     * the attribute set is null.
41     */
42    @Override
43    public Set<FileAttribute> getRequestedAttributes()
44    {
45        Set<FileAttribute> attributes = _attributes;
46        if (attributes == null) {
47            attributes = super.getRequestedAttributes();
48            attributes.add(STORAGEINFO);
49        }
50        return attributes;
51    }
52 
53    @Override
54    public void setFileAttributes(FileAttributes fileAttributes)
55    {
56        super.setFileAttributes(fileAttributes);
57 
58        /* For backwards compatibility with old versions we set this
59         * field. We do this even though we don't use the field.
60         */
61        if (fileAttributes.isDefined(STORAGEINFO)) {
62            _storageInfo = fileAttributes.getStorageInfo();
63        }
64    }
65 
66    public StorageInfo getStorageInfo()
67    {
68        return
69            (_fileAttributes == null || !_fileAttributes.isDefined(STORAGEINFO))
70            ? null
71            : _fileAttributes.getStorageInfo();
72    }
73 
74    public boolean resolve() { return this._followLinks; }
75    public void setResolve(boolean followLinks)
76    {
77        _followLinks = followLinks;
78        super.setResolve(followLinks);
79    }
80}

[all classes][diskCacheV111.vehicles]
EMMA 2.0.5312 (C) Vladimir Roubtsov