Skip to content

Commit

Permalink
pnfsmanager: Drop legacy PnfsGetFileMetaDataMessage
Browse files Browse the repository at this point in the history
Target: trunk
Require-notes: no
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/6265/
  • Loading branch information
gbehrmann committed Nov 26, 2013
1 parent 8747a50 commit fbae6b4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 121 deletions.
Expand Up @@ -43,7 +43,6 @@
import diskCacheV111.vehicles.PnfsDeleteEntryNotificationMessage;
import diskCacheV111.vehicles.PnfsFlagMessage;
import diskCacheV111.vehicles.PnfsGetCacheLocationsMessage;
import diskCacheV111.vehicles.PnfsGetFileMetaDataMessage;
import diskCacheV111.vehicles.PnfsGetParentMessage;
import diskCacheV111.vehicles.PnfsGetStorageInfoMessage;
import diskCacheV111.vehicles.PnfsMapPathMessage;
Expand Down Expand Up @@ -118,7 +117,6 @@ public class PnfsManagerV3
PnfsGetCacheLocationsMessage.class,
PnfsGetStorageInfoMessage.class,
PnfsMapPathMessage.class,
PnfsGetFileMetaDataMessage.class,
PnfsGetParentMessage.class,
PnfsCreateEntryMessage.class,
PnfsCreateDirectoryMessage.class,
Expand Down Expand Up @@ -174,7 +172,6 @@ private void populateRequestMap()
_gauges.addGauge(PnfsCreateEntryMessage.class);
_gauges.addGauge(PnfsDeleteEntryMessage.class);
_gauges.addGauge(PnfsGetStorageInfoMessage.class);
_gauges.addGauge(PnfsGetFileMetaDataMessage.class);
_gauges.addGauge(PnfsSetFileMetaDataMessage.class);
_gauges.addGauge(PnfsMapPathMessage.class);
_gauges.addGauge(PnfsRenameMessage.class);
Expand Down
17 changes: 0 additions & 17 deletions modules/dcache/src/main/java/diskCacheV111/util/PnfsHandler.java
Expand Up @@ -336,23 +336,6 @@ public PnfsGetStorageInfoMessage getStorageInfoByPnfsId( PnfsId pnfsId )
throws CacheException {
return pnfsRequest(new PnfsGetStorageInfoMessage( pnfsId )) ;

}

public PnfsGetStorageInfoMessage getStorageInfoByPath( String pnfsPath )
throws CacheException {
return getStorageInfoByPath(pnfsPath, false) ;

}

public PnfsGetStorageInfoMessage getStorageInfoByPath( String pnfsPath ,
boolean requestChecksum)
throws CacheException {

PnfsGetStorageInfoMessage sInfo = new PnfsGetStorageInfoMessage() ;
sInfo.setPnfsPath( pnfsPath ) ;
sInfo.setChecksumsRequested(requestChecksum);
return pnfsRequest( sInfo ) ;

}

public PnfsId getParentOf(PnfsId pnfsId)
Expand Down

This file was deleted.

@@ -1,46 +1,40 @@
// $Id: PnfsGetStorageInfoMessage.java,v 1.7 2006-04-11 09:47:53 tigran Exp $
package diskCacheV111.vehicles;

import java.util.Set;

import diskCacheV111.util.FileMetaData;
import diskCacheV111.util.PnfsId;

import org.dcache.namespace.FileAttribute;
import org.dcache.vehicles.FileAttributes;
import org.dcache.vehicles.PnfsGetFileAttributes;

import static org.dcache.namespace.FileAttribute.*;

public class PnfsGetStorageInfoMessage extends PnfsGetFileMetaDataMessage {

private boolean _followLinks = true;

public class PnfsGetStorageInfoMessage extends PnfsGetFileAttributes
{
private static final long serialVersionUID = -2574949600859502380L;

public PnfsGetStorageInfoMessage()
public PnfsGetStorageInfoMessage(Set<FileAttribute> attr)
{
super();
_attributes.add(STORAGEINFO);
_attributes.add(ACCESS_LATENCY);
_attributes.add(RETENTION_POLICY);
_attributes.add(SIZE);
this();
_attributes.addAll(attr);
}

public PnfsGetStorageInfoMessage(Set<FileAttribute> attr)
public PnfsGetStorageInfoMessage()
{
super(attr);
_attributes.add(STORAGEINFO);
_attributes.add(ACCESS_LATENCY);
_attributes.add(RETENTION_POLICY);
_attributes.add(SIZE);
this((PnfsId) null);
}

public PnfsGetStorageInfoMessage(PnfsId pnfsId)
{
super(pnfsId);
super(pnfsId, FileMetaData.getKnownFileAttributes());
_attributes.add(PNFSID);
_attributes.add(STORAGEINFO);
_attributes.add(ACCESS_LATENCY);
_attributes.add(RETENTION_POLICY);
_attributes.add(SIZE);
setReplyRequired(true);
}

@Override
Expand All @@ -56,13 +50,4 @@ public StorageInfo getStorageInfo()
? null
: _fileAttributes.getStorageInfo();
}

@Override
public boolean resolve() { return this._followLinks; }
@Override
public void setResolve(boolean followLinks)
{
_followLinks = followLinks;
super.setResolve(followLinks);
}
}

0 comments on commit fbae6b4

Please sign in to comment.