Lucene++ - a full-featured, c++ search engine
API Documentation


SimpleFSLockFactory.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6 
7 #ifndef SIMPLEFSLOCKFACTORY_H
8 #define SIMPLEFSLOCKFACTORY_H
9 
10 #include "FSLockFactory.h"
11 #include "Lock.h"
12 
13 namespace Lucene {
14 
17 class LPPAPI SimpleFSLockFactory : public FSLockFactory {
18 public:
23 
26  SimpleFSLockFactory(const String& lockDir);
27 
29 
31 
32 public:
34  virtual LockPtr makeLock(const String& lockName);
35 
37  virtual void clearLock(const String& lockName);
38 };
39 
40 }
41 
42 #endif
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Base class for file system based locking implementation.
Definition: FSLockFactory.h:15
Implements LockFactory using File#createNewFile().
Definition: SimpleFSLockFactory.h:17
virtual LockPtr makeLock(const String &lockName)
Return a new Lock instance identified by lockName.
virtual void clearLock(const String &lockName)
Attempt to clear (forcefully unlock and remove) the specified lock.
SimpleFSLockFactory(const String &lockDir)
Instantiate using the provided directory name.
SimpleFSLockFactory()
Create a SimpleFSLockFactory instance, with null (unset) lock directory. When you pass this factory t...
Definition: AbstractAllTermDocs.h:12
boost::shared_ptr< Lock > LockPtr
Definition: LuceneTypes.h:496

clucene.sourceforge.net