62 virtual void sync(
const String& name);
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
A Directory is a flat list of files. Files may be written once, when they are created....
Definition Directory.h:18
virtual IndexOutputPtr createOutput(const String &name)=0
Creates a new, empty file in the directory with the given name. Returns a stream writing this file.
virtual bool fileExists(const String &name)=0
Returns true if a file with the given name exists.
virtual void sync(const String &name)
Ensure that any writes to this file are moved to stable storage. Lucene uses this to properly commit ...
LockFactoryPtr lockFactory
Holds the LockFactory instance (implements locking for this Directory instance).
Definition Directory.h:29
static void copy(const DirectoryPtr &src, const DirectoryPtr &dest, bool closeDirSrc)
Copy contents of a directory src to a directory dest. If a file in src already exists in dest then th...
bool isOpen
Definition Directory.h:26
virtual HashSet< String > listAll()=0
Returns an array of strings, one for each file in the directory.
void setLockFactory(const LockFactoryPtr &lockFactory)
Set the LockFactory that this Directory instance should use for its locking implementation....
virtual String getLockID()
Return a string identifier that uniquely differentiates this Directory instance from other Directory ...
virtual void deleteFile(const String &name)=0
Removes an existing file in the directory.
virtual LockPtr makeLock(const String &name)
Construct a Lock.
virtual String toString()
Returns a string representation of the object.
virtual int64_t fileLength(const String &name)=0
Returns the length of a file in the directory.
virtual void close()=0
Closes the store.
LockFactoryPtr getLockFactory()
Get the LockFactory that this Directory instance is using for its locking implementation....
virtual IndexInputPtr openInput(const String &name)=0
Returns a stream reading an existing file.
virtual uint64_t fileModified(const String &name)=0
Returns the time the named file was last modified.
virtual IndexInputPtr openInput(const String &name, int32_t bufferSize)
Returns a stream reading an existing file, with the specified read buffer size. The particular Direct...
virtual void touchFile(const String &name)=0
Set the modified time of an existing file to now.
void clearLock(const String &name)
Attempt to clear (forcefully unlock and remove) the specified lock. Only call this at a time when you...
Utility template class to handle hash set collections that can be safely copied and shared.
Definition HashSet.h:17
Base class for all Lucene classes.
Definition LuceneObject.h:31
Definition AbstractAllTermDocs.h:12
boost::shared_ptr< Lock > LockPtr
Definition LuceneTypes.h:496
boost::shared_ptr< LockFactory > LockFactoryPtr
Definition LuceneTypes.h:497
boost::shared_ptr< IndexInput > IndexInputPtr
Definition LuceneTypes.h:493
boost::shared_ptr< Directory > DirectoryPtr
Definition LuceneTypes.h:489
boost::shared_ptr< IndexOutput > IndexOutputPtr
Definition LuceneTypes.h:494