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


Loading...
Searching...
No Matches
LockFactory.h
Go to the documentation of this file.
1
2// 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
12namespace Lucene {
13
23class LPPAPI LockFactory : public LuceneObject {
24public:
25 virtual ~LockFactory();
26
28
29protected:
30 String lockPrefix;
31
32public:
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
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Base class for Locking implementation. Directory uses instances of this class to implement locking....
Definition LockFactory.h:23
virtual ~LockFactory()
virtual void setLockPrefix(const String &lockPrefix)
Set the prefix in use for all locks created in this LockFactory. This is normally called once,...
String lockPrefix
Definition LockFactory.h:30
virtual LockPtr makeLock(const String &lockName)=0
Return a new Lock instance identified by lockName.
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...
virtual String getLockPrefix()
Get the prefix in use for all locks created in this LockFactory.
Base class for all Lucene classes.
Definition LuceneObject.h:31
Definition AbstractAllTermDocs.h:12
boost::shared_ptr< Lock > LockPtr
Definition LuceneTypes.h:496

clucene.sourceforge.net