1 | // $Id: Pool2PoolTransferMsg.java,v 1.8 2006-04-18 07:13:47 patrick Exp $ |
2 | |
3 | package diskCacheV111.vehicles; |
4 | import diskCacheV111.util.PnfsId ; |
5 | |
6 | |
7 | public class Pool2PoolTransferMsg extends PoolMessage { |
8 | |
9 | public final static int UNDETERMINED = 0 ; |
10 | public final static int PRECIOUS = 1 ; |
11 | public final static int CACHED = 2 ; |
12 | |
13 | private PnfsId _pnfsId = null ; |
14 | private StorageInfo _storageInfo = null ; |
15 | private String _destinationPoolName = null ; |
16 | private int _destinationFileStatus = UNDETERMINED ; |
17 | |
18 | private static final long serialVersionUID = -4227857007512530410L; |
19 | |
20 | public Pool2PoolTransferMsg( String sourcePoolName , |
21 | String destinationPoolName , |
22 | PnfsId pnfsId , |
23 | StorageInfo storageInfo ){ |
24 | super( sourcePoolName ) ; |
25 | _pnfsId = pnfsId ; |
26 | _storageInfo = storageInfo ; |
27 | _destinationPoolName = destinationPoolName ; |
28 | setReplyRequired(true); |
29 | } |
30 | |
31 | public PnfsId getPnfsId(){ |
32 | return _pnfsId ; |
33 | } |
34 | public StorageInfo getStorageInfo(){ return _storageInfo ; } |
35 | public String getSourcePoolName(){ return getPoolName() ; } |
36 | public String getDestinationPoolName(){ return _destinationPoolName ; } |
37 | |
38 | public void setDestinationFileStatus( int status ){ |
39 | _destinationFileStatus = status ; |
40 | } |
41 | public int getDestinationFileStatus(){ |
42 | return _destinationFileStatus ; |
43 | } |
44 | public String toString(){ |
45 | return getPoolName()+";pnfsid="+_pnfsId + ";mode="+ |
46 | ( _destinationFileStatus==UNDETERMINED? |
47 | "Undetermined": |
48 | ( _destinationFileStatus==PRECIOUS?"Precious":"Cached" )); |
49 | } |
50 | } |