| 1 | // $Id: PnfsFileInfoMessage.java,v 1.5 2006-04-11 09:47:53 tigran Exp $ |
| 2 | |
| 3 | package diskCacheV111.vehicles ; |
| 4 | import diskCacheV111.util.PnfsId ; |
| 5 | |
| 6 | public class PnfsFileInfoMessage extends InfoMessage { |
| 7 | private PnfsId _pnfsId = null ; |
| 8 | private String _path = "Unknown"; |
| 9 | private long _fileSize = 0 ; |
| 10 | private StorageInfo _storageInfo = null ; |
| 11 | |
| 12 | private static final long serialVersionUID = -7761016173336078097L; |
| 13 | |
| 14 | public PnfsFileInfoMessage( String messageType , |
| 15 | String cellType , |
| 16 | String cellName , |
| 17 | PnfsId pnfsId ){ |
| 18 | super( messageType , cellType , cellName ) ; |
| 19 | _pnfsId = pnfsId ; |
| 20 | } |
| 21 | public String getFileInfo(){ |
| 22 | return "["+_pnfsId+","+_fileSize+"]"+" "+ "[" + _path + "] " + |
| 23 | ( _storageInfo == null ? |
| 24 | "<unknown>" : |
| 25 | (_storageInfo.getStorageClass()+"@"+_storageInfo.getHsm())) ; |
| 26 | } |
| 27 | public void setFileSize( long fileSize ){ _fileSize = fileSize ; } |
| 28 | public long getFileSize(){ return _fileSize ; } |
| 29 | public PnfsId getPnfsId(){ return _pnfsId ; } |
| 30 | public void setPnfsId( PnfsId pnfsId ){ _pnfsId = pnfsId ; } |
| 31 | public void setStorageInfo( StorageInfo storageInfo ){ |
| 32 | _storageInfo = storageInfo ; |
| 33 | } |
| 34 | public StorageInfo getStorageInfo(){ return _storageInfo ; } |
| 35 | public String getPath() { return _path; } |
| 36 | public void setPath(String path) { _path = path; } |
| 37 | |
| 38 | } |