<commit_before>////////////////////////////////////////////////////////////////////////////////
//
// condor_sched.h
//
// Define class Scheduler. This class do local scheduling and then negotiates
// with the central manager to obtain resources for jobs.
//
////////////////////////////////////////////////////////////////////////////////

#ifndef _CONDOR_SCHED_H_
#define _CONDOR_SCHED_H_

#include "_condor_fix_types.h"
#include "dgram_io_handle.h"
#include "condor_classad.h"
#include "condor_xdr.h"
#include "proc.h"
#include "condor_daemon_core.h"
#include "sched.h"
#include "prio_rec.h"

const	int			MAX_SHADOW_RECS	= 512; 

extern	char**		environ;

struct shadow_rec
{
    int             pid;
    PROC_ID         job_id;
    struct Mrec*    match;
    int             preempted;
    int             conn_fd;
};

struct Mrec
{
    Mrec(char*, char*, PROC_ID*);
   
    char    		id[SIZE_OF_CAPABILITY_STRING];
    char    		peer[50];
    int     		cluster;
    int     		proc;
    int     		status;
    int     		agentPid;
	shadow_rec*		shadowRec;
	int				alive_countdown;
};

enum
{
    M_ACTIVE,
    M_INACTIVE,
    M_DELETED
};

#define MAXMATCHES      32

class Scheduler : public Service
{
  public:
	
	Scheduler();
	~Scheduler();
	
	// initialization
	void			Init();
	void			Register(DaemonCore*);

	// accessing
   	int				Port() { return port; }
 
	// maintainence
	void			timeout(); 
	void			sighup_handler();
	void			sigint_handler();
	void			SetClassAd(ClassAd*);
	void			SetSockName(int);
	
	// negotiation
	void			negotiate(XDR*, struct sockaddr_in*);
	void			reschedule_negotiator(XDR*, struct sockaddr_in*);

	// job managing<commit_msg>Added dummy function for vacate_service<commit_after>////////////////////////////////////////////////////////////////////////////////
//
// condor_sched.h
//
// Define class Scheduler. This class do local scheduling and then negotiates
// with the central manager to obtain resources for jobs.
//
////////////////////////////////////////////////////////////////////////////////

#ifndef _CONDOR_SCHED_H_
#define _CONDOR_SCHED_H_

#include "_condor_fix_types.h"
#include "dgram_io_handle.h"
#include "condor_classad.h"
#include "condor_xdr.h"
#include "proc.h"
#include "condor_daemon_core.h"
#include "sched.h"
#include "prio_rec.h"

const	int			MAX_SHADOW_RECS	= 512; 

extern	char**		environ;

struct shadow_rec
{
    int             pid;
    PROC_ID         job_id;
    struct Mrec*    match;
    int             preempted;
    int             conn_fd;
};

struct Mrec
{
    Mrec(char*, char*, PROC_ID*);
   
    char    		id[SIZE_OF_CAPABILITY_STRING];
    char    		peer[50];
    int     		cluster;
    int     		proc;
    int     		status;
    int     		agentPid;
	shadow_rec*		shadowRec;
	int				alive_countdown;
};

enum
{
    M_ACTIVE,
    M_INACTIVE,
    M_DELETED
};

#define MAXMATCHES      32

class Scheduler : public Service
{
  public:
	
	Scheduler();
	~Scheduler();
	
	// initialization
	void			Init();
	void			Register(DaemonCore*);

	// accessing
   	int				Port() { return port; }
 
	// maintainence
	void			timeout(); 
	void			sighup_handler();
	void			sigint_handler();
	void			SetClassAd(ClassAd*);
	void			SetSockName(int);
	
	// negotiation
	void			negotiate(XDR*, struct sockaddr_in*);
	void			reschedule_negotiator(XDR*, struct sockaddr_in*);
	void			vacate_service(XDR *, struct sockaddr_in*);

	// job managing
{'fraction_non_alphanumeric': 0.18764705882352942, 'fraction_numerical': 0.00411764705882353, 'mean_word_length': 1.9651264167393199, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '224860', 'n_tokens_mistral': 1248, 'n_tokens_neox': 1164, 'n_words': 265}