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

COVERAGE SUMMARY FOR SOURCE FILE [PnfsGetCacheLocationsMessage.java]

nameclass, %method, %block, %line, %
PnfsGetCacheLocationsMessage.java0%   (0/1)0%   (0/7)0%   (0/113)0%   (0/27)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PnfsGetCacheLocationsMessage0%   (0/1)0%   (0/7)0%   (0/113)0%   (0/27)
PnfsGetCacheLocationsMessage (): void 0%   (0/1)0%   (0/9)0%   (0/4)
PnfsGetCacheLocationsMessage (PnfsId): void 0%   (0/1)0%   (0/10)0%   (0/4)
fold (Message): boolean 0%   (0/1)0%   (0/50)0%   (0/10)
getCacheLocations (): List 0%   (0/1)0%   (0/3)0%   (0/1)
invalidates (Message): boolean 0%   (0/1)0%   (0/2)0%   (0/1)
setCacheLocations (List): void 0%   (0/1)0%   (0/4)0%   (0/2)
toString (): String 0%   (0/1)0%   (0/35)0%   (0/6)

1// $Id: PnfsGetCacheLocationsMessage.java,v 1.5 2007-05-24 13:51:05 tigran Exp $
2 
3package diskCacheV111.vehicles;
4import  diskCacheV111.util.* ;
5 
6import java.util.*;
7 
8public class PnfsGetCacheLocationsMessage extends PnfsMessage {
9 
10    private List<String> _cacheLocations = null;
11 
12    private static final long serialVersionUID = 6603606352524630293L;
13 
14    public PnfsGetCacheLocationsMessage(){
15        setReplyRequired(true);
16    }
17 
18    public PnfsGetCacheLocationsMessage(PnfsId pnfsId){
19        super(pnfsId);
20        setReplyRequired(true);
21    }
22 
23    public List<String> getCacheLocations(){
24        return _cacheLocations;
25    }
26 
27    public void setCacheLocations(List<String> cacheLocations){
28            _cacheLocations = cacheLocations;
29    }
30    public String toString(){
31       StringBuffer sb = new StringBuffer() ;
32       sb.append(getPnfsId()).append(";locs=") ;
33       if( _cacheLocations != null )
34         for( String location: _cacheLocations )
35            sb.append(location).
36               append(",") ;
37       return sb.toString() ;
38    }
39 
40    @Override
41    public boolean invalidates(Message message)
42    {
43        return false;
44    }
45 
46    @Override
47    public boolean fold(Message message)
48    {
49        if (message.getClass().equals(PnfsGetCacheLocationsMessage.class)) {
50            PnfsId pnfsId = getPnfsId();
51            String path = getPnfsPath();
52            PnfsGetCacheLocationsMessage msg =
53                (PnfsGetCacheLocationsMessage) message;
54            if ((pnfsId == null || pnfsId.equals(msg.getPnfsId())) &&
55                (path == null || path.equals(msg.getPnfsPath())) &&
56                (getSubject().equals(msg.getSubject()))) {
57                setPnfsId(msg.getPnfsId());
58                setPnfsPath(msg.getPnfsPath());
59                setCacheLocations(msg.getCacheLocations());
60                return true;
61            }
62        }
63 
64        return false;
65    }
66}

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