Logo ROOT   6.10/09
Reference Guide
TXProofServ.h
Go to the documentation of this file.
1 // @(#)root/proofx:$Id$
2 // Author: G. Ganis Oct 2005
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TXProofServ
13 #define ROOT_TXProofServ
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TXProofServ //
18 // //
19 // TXProofServ is the XRD version of the PROOF server. It differs from //
20 // TProofServ only for the underlying connection technology //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #include "TProofServ.h"
25 #include "TXHandler.h"
26 
27 class TXProofServInterruptHandler;
28 class TXSocketHandler;
29 
30 class TXProofServ : public TProofServ, public TXHandler {
31 
32 private:
33  TXProofServInterruptHandler *fInterruptHandler;
36 
37  Bool_t fTerminated; //true if Terminate() has been already called
38 
39  Int_t LockSession(const char *sessiontag, TProofLockPath **lck);
40 
41  Int_t Setup();
42 
43 public:
44  TXProofServ(Int_t *argc, char **argv, FILE *flog = 0);
45  virtual ~TXProofServ();
46 
48 
49  // Disable / Enable read timeout
50  void DisableTimeout();
51  void EnableTimeout();
52 
53  EQueryAction GetWorkers(TList *workers, Int_t &prioritychange,
54  Bool_t resume = kFALSE);
55 
56  Bool_t HandleError(const void *in = 0); // Error Handler
57  Bool_t HandleInput(const void *in = 0); // Input handler
58 
59  void HandleUrgentData();
60  void HandleSigPipe();
61  void HandleTermination();
62 
63  void ReleaseWorker(const char *ord);
64  void Terminate(Int_t status);
65 
66  ClassDef(TXProofServ,0) //XRD PROOF Server Application Interface
67 };
68 
69 #endif
TXSocketHandler * fInputHandler
Definition: TXProofServ.h:34
Int_t Setup()
Print the ProofServ logo on standard output.
Int_t CreateServer()
Finalize the server setup.
Bool_t HandleInput(const void *in=0)
Handle asynchronous input on the input socket.
Basic string class.
Definition: TString.h:129
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Int_t LockSession(const char *sessiontag, TProofLockPath **lck)
Try locking query area of session tagged sessiontag.
void HandleUrgentData()
Handle high priority data sent by the master or client.
void DisableTimeout()
Disable read timeout on the underlying socket.
void EnableTimeout()
Enable read timeout on the underlying socket.
#define ClassDef(name, id)
Definition: Rtypes.h:297
TXProofServInterruptHandler * fInterruptHandler
Definition: TXProofServ.h:33
void ReleaseWorker(const char *ord)
Send message to intermediate coordinator to release worker of last ordinal ord.
TString flog
Definition: pq2main.cxx:37
EQueryAction GetWorkers(TList *workers, Int_t &prioritychange, Bool_t resume=kFALSE)
Get list of workers to be used from now on.
A doubly linked list.
Definition: TList.h:43
This class implements the XProofD version of TProofServ, with respect to which it differs only for th...
Definition: TXProofServ.h:30
void Terminate(Int_t status)
Terminate the proof server.
Class providing the PROOF server.
Definition: TProofServ.h:66
Handler of asynchronous events for XProofD sockets.
Definition: TXHandler.h:28
Input handler for XProofD sockets.
virtual ~TXProofServ()
Cleanup.
void HandleSigPipe()
Called when the client is not alive anymore; terminate the session.
void HandleTermination()
Called when the client is not alive anymore; terminate the session.
const Bool_t kFALSE
Definition: RtypesCore.h:92
Bool_t HandleError(const void *in=0)
Handle error on the input socket.
TXProofServ(Int_t *argc, char **argv, FILE *flog=0)
Main constructor.
TString fSockPath
Definition: TXProofServ.h:35
Bool_t fTerminated
Definition: TXProofServ.h:37