Interface OFreezableStorageComponent
- All Known Subinterfaces:
OLuceneIndexEngine
- All Known Implementing Classes:
OAbstractPaginatedStorage,ODirectMemoryStorage,OLocalPaginatedStorage,OLuceneFullTextIndexEngine,OLuceneGeoSpatialIndexEngine,OLuceneIndexEngineAbstract,OLuceneLegacySpatialIndexEngine,OLuceneSpatialIndexEngineAbstract,OLuceneSpatialIndexEngineDelegator
public interface OFreezableStorageComponent
Interface for storage components that support freeze/release operations.
- Since:
- 1.5.1
- Author:
- Artem Orobets (enisher-at-gmail.com)
-
Method Summary
Modifier and TypeMethodDescriptionvoidfreeze(boolean throwException) After this method finished it's execution, all threads that are going to perform data modifications in storage should wait tillrelease()method will be called.voidrelease()After this method finished execution all threads that are waiting to perform data modifications in storage will be awaken and will be allowed to continue their execution.
-
Method Details
-
freeze
void freeze(boolean throwException) After this method finished it's execution, all threads that are going to perform data modifications in storage should wait tillrelease()method will be called. This method will wait till all ongoing modifications will be finished.- Parameters:
throwException- IftrueOModificationOperationProhibitedExceptionexception will be thrown on call of methods that requires storage modification. Otherwise other threads will wait forrelease()method call.
-
release
void release()After this method finished execution all threads that are waiting to perform data modifications in storage will be awaken and will be allowed to continue their execution.
-