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


LockFactory.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 LOCKFACTORY_H
8 #define LOCKFACTORY_H
9 
10 #include "LuceneObject.h"
11 
12 namespace Lucene {
13 
23 class LPPAPI LockFactory : public LuceneObject {
24 public:
25  virtual ~LockFactory();
26 
28 
29 protected:
30  String lockPrefix;
31 
32 public:
37  virtual void setLockPrefix(const String& lockPrefix);
38 
40  virtual String getLockPrefix();
41 
44  virtual LockPtr makeLock(const String& lockName) = 0;
45 
49  virtual void clearLock(const String& lockName) = 0;
50 };
51 
52 }
53 
54 #endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene::LockFactory::clearLock
virtual void clearLock(const String &lockName)=0
Attempt to clear (forcefully unlock and remove) the specified lock. Only call this at a time when you...
Lucene::LockPtr
boost::shared_ptr< Lock > LockPtr
Definition: LuceneTypes.h:496
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::LockFactory::makeLock
virtual LockPtr makeLock(const String &lockName)=0
Return a new Lock instance identified by lockName.
Lucene::LuceneObject
Base class for all Lucene classes.
Definition: LuceneObject.h:31
Lucene::LockFactory::setLockPrefix
virtual void setLockPrefix(const String &lockPrefix)
Set the prefix in use for all locks created in this LockFactory. This is normally called once,...
Lucene::LockFactory::getLockPrefix
virtual String getLockPrefix()
Get the prefix in use for all locks created in this LockFactory.
Lucene::LockFactory
Base class for Locking implementation. Directory uses instances of this class to implement locking....
Definition: LockFactory.h:23
Lucene::LockFactory::~LockFactory
virtual ~LockFactory()
LuceneObject.h
Lucene::LockFactory::lockPrefix
String lockPrefix
Definition: LockFactory.h:27

clucene.sourceforge.net