use of org.dcache.srm.v2_2.SrmReleaseSpaceResponse in project dcache by dCache.
the class SRMReleaseSpaceClientV2 method start.
@Override
public void start() throws Exception {
checkCredentialValid();
try {
request.setSpaceToken(configuration.getSpaceToken());
request.setForceFileRelease(configuration.getForceFileRelease());
configuration.getStorageSystemInfo().ifPresent(request::setStorageSystemInfo);
SrmReleaseSpaceResponse response = srm.srmReleaseSpace(request);
if (response == null) {
throw new IOException(" null SrmReleaseSpace");
}
TReturnStatus rs = response.getReturnStatus();
if (rs == null) {
throw new IOException(" null TReturnStatus ");
}
if (RequestStatusTool.isFailedRequestStatus(rs)) {
throw new IOException("srmReleaseSpace submission failed, unexpected or failed return status : " + rs.getStatusCode() + " explanation=" + rs.getExplanation());
}
} catch (Exception e) {
throw e;
}
}
use of org.dcache.srm.v2_2.SrmReleaseSpaceResponse in project dcache by dCache.
the class AxisSrmFileSystem method releaseSpace.
@Override
public void releaseSpace(String spaceToken) throws RemoteException, SRMException {
SrmReleaseSpaceResponse response = srm.srmReleaseSpace(new SrmReleaseSpaceRequest(null, spaceToken, null, null));
checkSuccess(response.getReturnStatus());
}
use of org.dcache.srm.v2_2.SrmReleaseSpaceResponse in project dcache by dCache.
the class SrmReleaseSpace method releaseSpace.
private SrmReleaseSpaceResponse releaseSpace() {
String token = request.getSpaceToken();
Callback callback = new Callback();
storage.srmReleaseSpace(user, token, null, callback);
TReturnStatus status = callback.waitResult(TIMEOUT);
return new SrmReleaseSpaceResponse(status);
}
Aggregations