Class UnixFSTransactionalPersistenceContextModule
java.lang.Object
com.google.inject.PrivateModule
dev.getelements.elements.rt.transact.unix.UnixFSTransactionalPersistenceContextModule
- All Implemented Interfaces:
com.google.inject.Module
public class UnixFSTransactionalPersistenceContextModule
extends com.google.inject.PrivateModule
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Exposes the details of theUnixFSTransactionalPersistenceContextModule
for testing purposes.Specifies theUnixFSChecksumAlgorithm
used for new entries in the journal and the revision table.withStorageRoot
(Path path) Specifies the storage root directory.Sets up a configuration for testing.withTestingDefaults
(String name) Sets up a configuration for testing.withTransactionBufferSize
(int size) Specifies the transaction buffer size.Methods inherited from class com.google.inject.PrivateModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, expose, expose, expose, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
-
Constructor Details
-
UnixFSTransactionalPersistenceContextModule
public UnixFSTransactionalPersistenceContextModule()
-
-
Method Details
-
configure
protected void configure()- Specified by:
configure
in classcom.google.inject.PrivateModule
-
withStorageRoot
Specifies the storage root directory.- Parameters:
path
- the path- Returns:
- this instance
-
withTransactionBufferSize
Specifies the transaction buffer size. That is the number of entries the transaction buffer will contain.- Parameters:
size
- the size of the transaction buffer- Returns:
- this instance
-
withChecksumAlgorithm
public UnixFSTransactionalPersistenceContextModule withChecksumAlgorithm(UnixFSChecksumAlgorithm algo) Specifies theUnixFSChecksumAlgorithm
used for new entries in the journal and the revision table.- Parameters:
algo
- the algorithm to use- Returns:
- this instance
-
exposeDetailsForTesting
Exposes the details of theUnixFSTransactionalPersistenceContextModule
for testing purposes.- Returns:
- this instance
-
withTestingDefaults
Sets up a configuration for testing. This creates a temporary directory to contain the database as well as configures it.- Returns:
- this instance
-
withTestingDefaults
Sets up a configuration for testing. This creates a temporary directory to contain the database as well as configures it.- Parameters:
name
- the name of the test, this is useful for examining the post-run output if necessary- Returns:
- this instance
-