00001 #ifndef __CMS_JOB_H__ 00002 #define __CMS_JOB_H__ 00003 /******************************************************************************/ 00004 /* */ 00005 /* X r d C m s J o b . h h */ 00006 /* */ 00007 /* */ 00008 /* (c) 2007 by the Board of Trustees of the Leland Stanford, Jr., University */ 00009 /* All Rights Reserved */ 00010 /* Produced by Andrew Hanushevsky for Stanford University under contract */ 00011 /* DE-AC02-76-SFO0515 with the Department of Energy */ 00012 /* */ 00013 /* This file is part of the XRootD software suite. */ 00014 /* */ 00015 /* XRootD is free software: you can redistribute it and/or modify it under */ 00016 /* the terms of the GNU Lesser General Public License as published by the */ 00017 /* Free Software Foundation, either version 3 of the License, or (at your */ 00018 /* option) any later version. */ 00019 /* */ 00020 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */ 00021 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */ 00022 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */ 00023 /* License for more details. */ 00024 /* */ 00025 /* You should have received a copy of the GNU Lesser General Public License */ 00026 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */ 00027 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */ 00028 /* */ 00029 /* The copyright holder's institutional names and contributor's names may not */ 00030 /* be used to endorse or promote products derived from this software without */ 00031 /* specific prior written permission of the institution or contributor. */ 00032 /******************************************************************************/ 00033 00034 #include "XProtocol/YProtocol.hh" 00035 00036 #include "Xrd/XrdJob.hh" 00037 #include "XrdSys/XrdSysPthread.hh" 00038 00039 class XrdCmsProtocol; 00040 class XrdCmsRRData; 00041 00042 class XrdCmsJob : public XrdJob 00043 { 00044 public: 00045 00046 static XrdCmsJob *Alloc(XrdCmsProtocol *, XrdCmsRRData *); 00047 00048 void DoIt(); 00049 00050 void Recycle(); 00051 00052 XrdCmsJob() : XrdJob("cms request job"), JobLink(0) {} 00053 ~XrdCmsJob() {} 00054 00055 private: 00056 00057 static XrdSysMutex JobMutex; 00058 static XrdCmsJob *JobStack; 00059 XrdCmsJob *JobLink; 00060 00061 XrdCmsProtocol *theProto; 00062 XrdCmsRRData *theData; 00063 }; 00064 #endif