xrootd
XrdXrootdFileLock1.hh
Go to the documentation of this file.
1 #ifndef _XROOTD_FILELOCK1_H_
2 #define _XROOTD_FILELOCK1_H_
3 /******************************************************************************/
4 /* */
5 /* X r d X r o o t d F i l e L o c k 1 . h h */
6 /* */
7 /* (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University */
8 /* All Rights Reserved. See XrdInfo.cc for complete License Terms */
9 /* Produced by Andrew Hanushevsky for Stanford University under contract */
10 /* DE-AC03-76-SFO0515 with the Department of Energy */
11 /******************************************************************************/
12 
13 // $Id$
14 
15 #include "XrdSys/XrdSysPthread.hh"
18 
19 // This class implements a single server per host lock manager by simply using
20 // an in-memory hash table to keep track of file locks.
21 //
23 {
24 public:
25 
26  int Lock(XrdXrootdFile *fp, int force=0);
27 
28  void numLocks(XrdXrootdFile *fp, int &rcnt, int &wcnt);
29 
30  int Unlock(XrdXrootdFile *fp);
31 
33  ~XrdXrootdFileLock1() {} // This object is never destroyed!
34 private:
35 static const char *TraceID;
37 };
38 #endif