Package org.apache.airavata.workflow.tracking.common

Examples of org.apache.airavata.workflow.tracking.common.DataObj


     *
     */
    public DataObj dataConsumed(WorkflowTrackingContext context, URI dataId, List<URI> locations,
            String... descriptionAndAnnotation) {

        DataObj dataObj = new DataObjImpl(dataId, locations);
        return dataConsumed(context, dataObj, descriptionAndAnnotation);
    }
View Full Code Here


    }

    public DataObj dataConsumed(WorkflowTrackingContext context, URI dataId, List<URI> locations, int sizeInBytes,
            String... descriptionAndAnnotation) {

        DataObj dataObj = new DataObjImpl(dataId, locations, sizeInBytes);
        return dataConsumed(context, dataObj, descriptionAndAnnotation);
    }
View Full Code Here

     *
     */
    public DataObj dataProduced(WorkflowTrackingContext context, URI dataId, List<URI> locations,
            String... descriptionAndAnnotation) {

        DataObj dataObj = new DataObjImpl(dataId, locations);
        return dataProduced(context, dataObj, descriptionAndAnnotation);
    }
View Full Code Here

    }

    public DataObj dataProduced(WorkflowTrackingContext context, URI dataId, List<URI> locations, int sizeInBytes,
            String... descriptionAndAnnotation) {

        DataObj dataObj = new DataObjImpl(dataId, locations, sizeInBytes);
        return dataProduced(context, dataObj, descriptionAndAnnotation);
    }
View Full Code Here

        if (context == null)
            throw new RuntimeException("Local entity passed was NULL.");
        if (dataDurationObj == null)
            throw new RuntimeException("Data duration object passed was NULL.");

        DataObj dataObj = null;
        if ((dataObj = dataDurationObj.getDataObj()) == null)
            throw new RuntimeException("Data duration object's DataObje was NULL.");
        if (dataObj.getId() == null)
            throw new RuntimeException("Data object's ID was NULL.");
        if (dataObj.getLocalLocation() == null)
            throw new RuntimeException("Local file URL passed in DataDurationObj.getDataObj was NULL.");
        if (dataDurationObj.getRemoteLocation() == null)
            throw new RuntimeException("Remote file URL passed in DataDurationObj was NULL.");

        // mark computation end
        dataDurationObj.markEndTimeMillis();

        // create activity
        DataSendDurationDocument activity = DataSendDurationDocument.Factory.newInstance();
        DataTransferDurationType activityType = activity.addNewDataSendDuration();

        activityType.setId(dataObj.getId().toString());
        activityType.setDurationInMillis(dataDurationObj.getDurationMillis());
        activityType.setSizeInBytes(dataObj.getSizeInBytes());

        activityType.setSource(dataObj.getLocalLocation().toString());

        activityType.setTarget(dataDurationObj.getRemoteLocation().toString());

        sendNotification(context, activity, descriptionAndAnnotation, "[Data at " + dataObj.getLocalLocation()
                + " was sent to " + dataDurationObj.getRemoteLocation() + "]");

        return dataDurationObj;
    }
View Full Code Here

        List<URI> locations = new ArrayList<URI>(2);
        locations.add(localLocation);
        locations.add(remoteLocation);

        DataObj dataObj = new DataObjImpl(dataID, locations, sizeInBytes);
        DataDurationObj dataDurationObj = new DataDurationImpl(dataObj, remoteLocation, durationMillis);

        return dataSendFinished(context, dataDurationObj, descriptionAndAnnotation);
    }
View Full Code Here

        List<URI> locations = new ArrayList<URI>(2);
        locations.add(localLocation);
        locations.add(remoteLocation);

        DataObj dataObj = new DataObjImpl(dataID, locations);
        DataDurationObj dataDurationObj = new DataDurationImpl(dataObj, remoteLocation);

        return dataDurationObj;
    }
View Full Code Here

        if (context == null)
            throw new RuntimeException("Local entity passed was NULL.");
        if (dataDurationObj == null)
            throw new RuntimeException("Data duration object passed was NULL.");

        DataObj dataObj = null;
        if ((dataObj = dataDurationObj.getDataObj()) == null)
            throw new RuntimeException("Data duration object's DataObj was NULL.");
        if (dataObj.getId() == null)
            throw new RuntimeException("Data object's ID was NULL.");
        if (dataObj.getLocalLocation() == null)
            throw new RuntimeException("Local file URL passed in DataDurationObj.getDataObj was NULL.");
        if (dataDurationObj.getRemoteLocation() == null)
            throw new RuntimeException("Remote file URL passed in DataDurationObj was NULL.");

        // mark computation end
        dataDurationObj.markEndTimeMillis();

        // create activity
        DataReceiveDurationDocument activity = DataReceiveDurationDocument.Factory.newInstance();
        DataTransferDurationType activityType = activity.addNewDataReceiveDuration();

        activityType.setId(dataObj.getId().toString());
        activityType.setDurationInMillis(dataDurationObj.getDurationMillis());
        activityType.setSizeInBytes(dataObj.getSizeInBytes());

        activityType.setSource(dataObj.getLocalLocation().toString());

        activityType.setTarget(dataDurationObj.getRemoteLocation().toString());

        sendNotification(context, activity, descriptionAndAnnotation,
                "[Data from " + dataDurationObj.getRemoteLocation() + " was received at " + dataObj.getLocalLocation()
                        + "]");

        return dataDurationObj;
    }
View Full Code Here

        List<URI> locations = new ArrayList<URI>(2);
        locations.add(localLocation);
        locations.add(remoteLocation);

        DataObj dataObj = new DataObjImpl(dataID, locations, sizeInBytes);
        DataDurationObj dataDurationObj = new DataDurationImpl(dataObj, remoteLocation, durationMillis);

        return dataReceiveFinished(context, dataDurationObj, descriptionAndAnnotation);
    }
View Full Code Here

     *
     */
    public DataObj dataConsumed(WorkflowTrackingContext context, URI dataId, List<URI> locations,
            String... descriptionAndAnnotation) {

        DataObj dataObj = new DataObjImpl(dataId, locations);
        return dataConsumed(context, dataObj, descriptionAndAnnotation);
    }
View Full Code Here

TOP

Related Classes of org.apache.airavata.workflow.tracking.common.DataObj

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.