GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

GATJobCPIInstanceData.h

Go to the documentation of this file.
00001 /** @file GATJobCPIInstanceData.h
00002  *  Header file for the GATJobCPIInstance_Data class, which represents the 
00003  *  internal data stored by the JobCPI provider for the resource broker 
00004  *  adaptor.
00005  *
00006  *  @date Tue Dec 09 2003
00007  *
00008  *  @version $Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/resourcebroker/GATJobCPIInstanceData.h,v 1.2 2004/03/30 12:02:19 hartmutkaiser Exp $
00009  *
00010  *  Copyright (C) Hartmut Kaiser
00011  *  This file is part of the GAT Engine.
00012  *  Contributed by Hartmut Kaiser <hartmutkaiser [at] t-online [dot] de>.
00013  *
00014  *  Use, modification and distribution is subject to the Gridlab Software
00015  *  License. (See accompanying file GLlicense.txt or copy at
00016  *  http://www.gridlab.org/GLlicense.txt)
00017  */
00018 
00019 #if !defined(_GATJOBCPIINSTANCEDATA_H_)
00020 #define _GATJOBCPIINSTANCEDATA_H_
00021 
00022 #include "GAT.h"
00023 
00024 /* Instance data */
00025 typedef struct GATJobCPIInstance_Data 
00026 {
00027   GATJobDescription description;  /* the description this job was constructed from */
00028   GATTable parameters;    /* the parameters of this job */
00029   GATResource resource;   /* the resource this job is actually submitted to */
00030   GATStatus status;       /* in case of a failure this status holds more info */
00031 } GATJobCPIInstance_Data;
00032 
00033 
00034 GATJobCPIInstance_Data *GATJobCPIInstance_Data_Create(
00035     GATJobDescription_const description, GATResource_const resource, 
00036     GATBool checkpointable);
00037 
00038 /** GATJobCPIInstance_Data_Destroy
00039  *
00040  *  The function GATJobCPIInstance_Data_Destroy is called to 
00041  *  free all the memory associated with the given instance data item.
00042  *
00043  *  @param instance_data The pointer to a variable holding the old instance 
00044  *        data item, this is set to zero on exit.
00045  */
00046 void 
00047   GATJobCPIInstance_Data_Destroy(GATJobCPIInstance_Data **);
00048 
00049 /** GATJobCPIInstance_Data_Clone
00050  *
00051  *  The function GATJobCPIInstance_Data_Clone is called to make 
00052  *  a copy of the given instance data item.
00053  *
00054  *  @param instance_data The instance data item to copy.
00055  *  @param new_instance_Data The pointer to a variable, which receives the 
00056  *        newly created copy of the instance data item.
00057  *
00058  *  @return An error code.
00059  */
00060 GATResult 
00061   GATJobCPIInstance_Data_Clone(GATJobCPIInstance_Data const *, 
00062     GATJobCPIInstance_Data **);
00063 
00064 /** GATJobCPIInstance_Data_Equals
00065  *
00066  *  The function GATJobCPIInstance_Data_Equals is called, 
00067  *  whenever the engine needs to compare for equality two different instance 
00068  *  data items.
00069  *
00070  *  @param lhs The first instance data item to compare.
00071  *  @param rhs The second instance data item to compare.
00072  *  @param isequal The pointer to a variable, which receives the result of the
00073  *        compare operation.
00074  *
00075  *  @result An error code.
00076  */
00077 GATResult 
00078   GATJobCPIInstance_Data_Equals(GATJobCPIInstance_Data const *, 
00079     GATJobCPIInstance_Data const *, GATBool *);
00080 
00081 /** GATJobCPIInstance_Data_Serialize
00082  *
00083  *  The function GATJobCPIInstance_Data_Serialize is called by the engine, 
00084  *  whenever the instance specific data has to be serialised. The function 
00085  *  should serialise into the given stream all the instance specific data of 
00086  *  the object.
00087  *
00088  *  @param instance_data The instance data item to serialise.
00089  *  @param stream The stream to be used for serialisation of the instance data.
00090  *  @param clear_dirty If the clear_dirty parameter is set to GATTrue, the 
00091  *        internal dirty flag of this object is to be reset.
00092  *
00093  *  @return An error code.
00094  */
00095 GATResult 
00096   GATJobCPIInstance_Data_Serialize(
00097     GATJobCPIInstance_Data const *instance_data, GATObject stream,
00098     GATBool clear_dirty);
00099   
00100 /** GATJobCPIInstance_Data_DeSerialize
00101  *
00102  *  The function GATJobCPIInstance_Data_DeSerialize is called by the engine, 
00103  *  whenever the client requested a DeSerialise operation for
00104  *  a corresponding object. The function should deserialise all the instance 
00105  *  specific data of the object from the given stream.
00106  *
00107  *  @param context The GATContext to use to instantiate new GAT objects.
00108  *  @param stream The stream to use to get the serialised data from.
00109  *  @param instance_data The pointer to a variable, which receives the new
00110  *        instance data deserialised from the given steam.
00111  *
00112  *  @return An error code.
00113  */
00114 GATResult 
00115   GATJobCPIInstance_Data_DeSerialize(GATContext context, GATObject stream, 
00116     GATJobCPIInstance_Data **instance_data);
00117 
00118 #endif /* _GATJOBCPIINSTANCEDATA_H_ */