Skip to content

Commit

Permalink
Remove deprecated StorageEngine.satisfyDependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
davidegrohmann committed Mar 22, 2016
1 parent 1f322a1 commit 95c6015
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 27 deletions.
Expand Up @@ -440,11 +440,6 @@ public void start() throws IOException
propertyKeyTokenHolder, labelTokens, relationshipTypeTokens, legacyIndexProviderLookup,
indexConfigStore, updateableSchemaState::clear, legacyIndexTransactionOrdering, format );

// We pretend that the storage engine abstract hides all details within it. Whereas that's mostly
// true it's not entirely true for the time being. As long as we need this call below, which
// makes available one or more internal things to the outside world, there are leaks to plug.
storageEngine.satisfyDependencies( dependencies );

LogEntryReader<ReadableClosablePositionAwareChannel> logEntryReader =
new VersionAwareLogEntryReader<>( storageEngine.commandReaderFactory() );

Expand Down Expand Up @@ -562,13 +557,20 @@ private StorageEngine buildStorageEngine(
RecordFormats format )
{
LabelScanStoreProvider labelScanStore = dependencyResolver.resolveDependency( LabelScanStoreProvider.class,
HighestSelectionStrategy.getInstance());
return life.add(
new RecordStorageEngine( storeDir, config, idGeneratorFactory, pageCache, fs, logProvider, propertyKeyTokenHolder,
labelTokens, relationshipTypeTokens, schemaStateChangeCallback, constraintSemantics, scheduler,
tokenNameLookup, lockService, schemaIndexProvider, indexingServiceMonitor, databaseHealth,
labelScanStore, legacyIndexProviderLookup, indexConfigStore, legacyIndexTransactionOrdering,
format ) );
HighestSelectionStrategy.getInstance() );
RecordStorageEngine storageEngine = new RecordStorageEngine( storeDir, config, idGeneratorFactory, pageCache,
fs, logProvider, propertyKeyTokenHolder, labelTokens, relationshipTypeTokens, schemaStateChangeCallback,
constraintSemantics, scheduler, tokenNameLookup, lockService, schemaIndexProvider,
indexingServiceMonitor, databaseHealth, labelScanStore, legacyIndexProviderLookup, indexConfigStore,
legacyIndexTransactionOrdering, format );

// We pretend that the storage engine abstract hides all details within it. Whereas that's mostly
// true it's not entirely true for the time being. As long as we need this call below, which
// makes available one or more internal things to the outside world, there are leaks to plug.
storageEngine.satisfyDependencies( dependencies );

return life.add( storageEngine );

}

private TransactionLogModule buildTransactionLogs(
Expand Down
Expand Up @@ -375,7 +375,6 @@ private BatchTransactionApplierFacade applier( TransactionApplicationMode mode )
appliers.toArray( new BatchTransactionApplier[appliers.size()] ) );
}

@Override
public void satisfyDependencies( DependencySatisfier satisfier )
{
satisfier.satisfyDependency( legacyIndexApplierLookup );
Expand Down
Expand Up @@ -26,7 +26,6 @@
import org.neo4j.kernel.api.exceptions.TransactionFailureException;
import org.neo4j.kernel.api.exceptions.schema.ConstraintValidationKernelException;
import org.neo4j.kernel.api.exceptions.schema.CreateConstraintFailureException;
import org.neo4j.kernel.impl.util.DependencySatisfier;
import org.neo4j.kernel.info.DiagnosticsManager;
import org.neo4j.storageengine.api.lock.ResourceLocker;
import org.neo4j.storageengine.api.txstate.ReadableTransactionState;
Expand Down Expand Up @@ -124,17 +123,4 @@ void createCommands(

@Deprecated
void loadSchemaCache();

/**
* TEMPORARY method as this potentially exposes internal services which shouldn't really be accessible
* outside the boundaries of this API. This is here as a transitional method while there still
* exists abstraction leaks.
*
* @param satisfier {@link DependencySatisfier} to satisfy with internal service which still are needed
* outside this interface.
* @deprecated since accessing internal services like this shouldn't be required if all abstractions
* are correct and doesn't leak.
*/
@Deprecated
void satisfyDependencies( DependencySatisfier satisfier );
}

0 comments on commit 95c6015

Please sign in to comment.