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
12 namespace Lucene {
13
23 class LPPAPI LockFactory : public LuceneObject {
24 public:
25 virtual ~LockFactory();
26
27 LUCENE_CLASS(LockFactory);
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
LuceneObject.h
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
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()
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::lockPrefix
String lockPrefix
Definition LockFactory.h:30
Lucene::LockFactory::makeLock
virtual LockPtr makeLock(const String &lockName)=0
Return a new Lock instance identified by lockName.
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::LockFactory::getLockPrefix
virtual String getLockPrefix()
Get the prefix in use for all locks created in this LockFactory.
Lucene::LuceneObject::LuceneObject
LuceneObject()
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::LockPtr
boost::shared_ptr< Lock > LockPtr
Definition LuceneTypes.h:496

clucene.sourceforge.net