Search in sources :

Example 1 with LogManager

use of com.thinkaurelius.titan.diskstorage.log.LogManager in project titan by thinkaurelius.

the class TitanGraphBaseTest method closeLogs.

private void closeLogs() {
    try {
        for (LogManager lm : logManagers.values()) lm.close();
        logManagers.clear();
        if (logStoreManager != null) {
            logStoreManager.close();
            logStoreManager = null;
        }
    } catch (BackendException e) {
        throw new TitanException(e);
    }
}
Also used : LogManager(com.thinkaurelius.titan.diskstorage.log.LogManager) KCVSLogManager(com.thinkaurelius.titan.diskstorage.log.kcvs.KCVSLogManager) BackendException(com.thinkaurelius.titan.diskstorage.BackendException)

Example 2 with LogManager

use of com.thinkaurelius.titan.diskstorage.log.LogManager in project titan by thinkaurelius.

the class Backend method getLogManager.

private static LogManager getLogManager(Configuration config, String logName, KeyColumnValueStoreManager sm) {
    Configuration logConfig = config.restrictTo(logName);
    String backend = logConfig.get(LOG_BACKEND);
    if (backend.equalsIgnoreCase(LOG_BACKEND.getDefaultValue())) {
        return new KCVSLogManager(sm, logConfig);
    } else {
        Preconditions.checkArgument(config != null);
        LogManager lm = getImplementationClass(logConfig, logConfig.get(LOG_BACKEND), REGISTERED_LOG_MANAGERS);
        Preconditions.checkNotNull(lm);
        return lm;
    }
}
Also used : KCVSLogManager(com.thinkaurelius.titan.diskstorage.log.kcvs.KCVSLogManager) TransactionConfiguration(com.thinkaurelius.titan.graphdb.transaction.TransactionConfiguration) GraphDatabaseConfiguration(com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration) KCVSConfiguration(com.thinkaurelius.titan.diskstorage.configuration.backend.KCVSConfiguration) LogManager(com.thinkaurelius.titan.diskstorage.log.LogManager) KCVSLogManager(com.thinkaurelius.titan.diskstorage.log.kcvs.KCVSLogManager)

Aggregations

LogManager (com.thinkaurelius.titan.diskstorage.log.LogManager)2 KCVSLogManager (com.thinkaurelius.titan.diskstorage.log.kcvs.KCVSLogManager)2 BackendException (com.thinkaurelius.titan.diskstorage.BackendException)1 KCVSConfiguration (com.thinkaurelius.titan.diskstorage.configuration.backend.KCVSConfiguration)1 GraphDatabaseConfiguration (com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration)1 TransactionConfiguration (com.thinkaurelius.titan.graphdb.transaction.TransactionConfiguration)1