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.c File Reference

Source file for the GATJobCPIInstance_Data class, which represents the internal data stored by the JobCPI provider for the resource broker adaptor. More...

#include <string.h>
#include <sys/utsname.h>
#include "GATJobCPIInstanceData.h"

Include dependency graph for GATJobCPIInstanceData.c:

Include dependency graph

Go to the source code of this file.

Functions

GATJobCPIInstance_DataGATJobCPIInstance_Data_Create (GATJobDescription_const description, GATResource_const resource, GATBool checkpointable)
 GATJobCPIInstance_Data_Create.

void GATJobCPIInstance_Data_Destroy (GATJobCPIInstance_Data **instance_data)
 GATJobCPIInstance_Data_Destroy.

GATResult GATJobCPIInstance_Data_Clone (GATJobCPIInstance_Data const *instance_data, GATJobCPIInstance_Data **new_instance_data)
 GATJobCPIInstance_Data_Clone.

GATResult GATJobCPIInstance_Data_Equals (GATJobCPIInstance_Data const *lhs, GATJobCPIInstance_Data const *rhs, GATBool *isequal)
 GATJobCPIInstance_Data_Equals.

GATResult GATJobCPIInstance_Data_Serialize (GATJobCPIInstance_Data const *instance_data, GATObject stream, GATBool clear_dirty)
 GATJobCPIInstance_Data_Serialize.

GATResult GATJobCPIInstance_Data_DeSerialize (GATContext context, GATObject stream, GATJobCPIInstance_Data **instance_data)
 GATJobCPIInstance_Data_DeSerialize.


Variables

const char * rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/resourcebroker/GATJobCPIInstanceData.c,v 1.4 2004/04/02 12:31:57 hartmutkaiser Exp $"


Detailed Description

Source file for the GATJobCPIInstance_Data class, which represents the internal data stored by the JobCPI provider for the resource broker adaptor.

Date:
Tue Dec 09 2003
Version:
Header:
/export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/resourcebroker/GATJobCPIInstanceData.c,v 1.4 2004/04/02 12:31:57 hartmutkaiser Exp

Copyright (C) Hartmut Kaiser This file is part of the GAT Engine. Contributed by Hartmut Kaiser <hartmutkaiser [at] t-online [dot] de>.

Use, modification and distribution is subject to the Gridlab Software License. (See accompanying file GLlicense.txt or copy at http://www.gridlab.org/GLlicense.txt)

Definition in file GATJobCPIInstanceData.c.


Function Documentation

GATJobCPIInstance_Data* GATJobCPIInstance_Data_Create GATJobDescription_const    description,
GATResource_const    resource,
GATBool    checkpointable
 

GATJobCPIInstance_Data_Create.

The function GATJobCPIInstance_Data_Create creates a new instance of the internal CPI instance data.

Parameters:
description  The job description used for creating the corresponding GATJob object.
Returns:
The pointer to the newly created and initialised data structure.

Definition at line 49 of file GATJobCPIInstanceData.c.

References GATJobCPIInstance_Data::description, GAT_FAILED, GAT_SUCCEEDED, GATBool, GATJobCPIInstance_Data_Destroy(), GATJobDescription_Clone(), GATJobDescription_const, GATResource_Clone(), GATResource_const, GATTable_Add_GATObject(), GATTable_Add_int(), GATTable_Add_String(), GATTable_Create(), GATTime_Create(), GATTime_Destroy(), GATJobCPIInstance_Data::parameters, and GATJobCPIInstance_Data::resource.

Referenced by resourcebroker_adaptor_GATSelfCPI_GetJob(), and resourcebroker_adaptor_SubmitJob().

void GATJobCPIInstance_Data_Destroy GATJobCPIInstance_Data **    instance_data
 

GATJobCPIInstance_Data_Destroy.

The function GATJobCPIInstance_Data_Destroy is called to free all the memory associated with the given instance data item.

Parameters:
instance_data  The pointer to a variable holding the old instance data item, this is set to zero on exit.

Definition at line 105 of file GATJobCPIInstanceData.c.

References GATJobDescription_Destroy(), GATResource_Destroy(), GATStatus_Destroy(), and GATTable_Destroy().

Referenced by GATJobCPIInstance_Data_Clone(), GATJobCPIInstance_Data_Create(), resourcebroker_adaptor_GATJobCPI_DestroyInstance(), resourcebroker_adaptor_GATSelfCPI_GetJob(), and resourcebroker_adaptor_SubmitJob().

GATResult GATJobCPIInstance_Data_Clone GATJobCPIInstance_Data const *    instance_data,
GATJobCPIInstance_Data **    new_instance_data
 

GATJobCPIInstance_Data_Clone.

The function GATJobCPIInstance_Data_Clone is called to make a copy of the given instance data item.

Parameters:
instance_data  The instance data item to copy.
new_instance_Data  The pointer to a variable, which receives the newly created copy of the instance data item.
Returns:
An error code.

Definition at line 132 of file GATJobCPIInstanceData.c.

References GATJobCPIInstance_Data::description, GAT_INVALID_PARAMETER, GAT_MEMORYFAILURE, GAT_SUCCEEDED, GATJobCPIInstance_Data_Destroy(), GATJobDescription_Clone(), GATResource_Clone(), GATResult, GATStatus_Clone(), GATTable_Clone(), GATJobCPIInstance_Data::parameters, GATJobCPIInstance_Data::resource, and GATJobCPIInstance_Data::status.

Referenced by resourcebroker_adaptor_GATJobCPI_CloneInstance(), and resourcebroker_adaptor_GATJobCPI_CreateInstance().

GATResult GATJobCPIInstance_Data_Equals GATJobCPIInstance_Data const *    lhs,
GATJobCPIInstance_Data const *    rhs,
GATBool   isequal
 

GATJobCPIInstance_Data_Equals.

The function GATJobCPIInstance_Data_Equals is called, whenever the engine needs to compare for equality two different instance data items.

Parameters:
lhs  The first instance data item to compare.
rhs  The second instance data item to compare.
isequal  The pointer to a variable, which receives the result of the compare operation.
Returns:
An error code.

Definition at line 189 of file GATJobCPIInstanceData.c.

References GATJobCPIInstance_Data::description, GAT_INVALID_HANDLE, GAT_INVALID_PARAMETER, GAT_SUCCEEDED, GAT_SUCCESS, GATBool, GATFalse, GATJobDescription_Equals(), GATResource_Equals(), GATResult, GATStatus_Equals(), GATTable_Equals(), GATTrue, GATJobCPIInstance_Data::parameters, GATJobCPIInstance_Data::resource, and GATJobCPIInstance_Data::status.

Referenced by resourcebroker_adaptor_GATJobCPI_EqualsInstance().

GATResult GATJobCPIInstance_Data_Serialize GATJobCPIInstance_Data const *    instance_data,
GATObject    stream,
GATBool    clear_dirty
 

GATJobCPIInstance_Data_Serialize.

The function GATJobCPIInstance_Data_Serialize is called by the engine, whenever the instance specific data has to be serialised. The function should serialise into the given stream all the instance specific data of the object.

Parameters:
instance_data  The instance data item to serialise.
stream  The stream to be used for serialisation of the instance data.
clear_dirty  If the clear_dirty parameter is set to GATTrue, the internal dirty flag of this object is to be reset.
Returns:
An error code.

Definition at line 252 of file GATJobCPIInstanceData.c.

References GATJobCPIInstance_Data::description, GAT_INVALID_HANDLE, GAT_SUCCEEDED, GATBool, GATFalse, GATJobDescription_Serialise(), GATResource_Serialise(), GATResult, GATStatus_Serialise(), GATTable_Serialise(), GATTrue, GATuint32_Serialise(), GATJobCPIInstance_Data::parameters, GATJobCPIInstance_Data::resource, and GATJobCPIInstance_Data::status.

Referenced by resourcebroker_adaptor_GATJobCPI_Serialise().

GATResult GATJobCPIInstance_Data_DeSerialize GATContext    context,
GATObject    stream,
GATJobCPIInstance_Data **    instance_data
 

GATJobCPIInstance_Data_DeSerialize.

The function GATJobCPIInstance_Data_DeSerialize is called by the engine, whenever the client requested a DeSerialise operation for a corresponding object. The function should deserialise all the instance specific data of the object from the given stream.

Parameters:
context  The GATContext to use to instantiate new GAT objects.
stream  The stream to use to get the serialised data from.
instance_data  The pointer to a variable, which receives the new instance data deserialised from the given steam.
Returns:
An error code.

Definition at line 313 of file GATJobCPIInstanceData.c.

References GAT_NOTIMPL, and GATResult.

Referenced by resourcebroker_adaptor_GATJobCPI_DeSerialise().


Variable Documentation

const char* rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/resourcebroker/GATJobCPIInstanceData.c,v 1.4 2004/04/02 12:31:57 hartmutkaiser Exp $" [static]
 

Definition at line 19 of file GATJobCPIInstanceData.c.