Skip to content

Commit

Permalink
Small unused declaration cleanup
Browse files Browse the repository at this point in the history
Remove unused classes, parameters in kernel and ha modules
  • Loading branch information
MishaDemianenko committed Jun 12, 2018
1 parent 4750c50 commit 1212b3a
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 194 deletions.
Expand Up @@ -20,7 +20,6 @@
package org.neo4j.kernel.api.schema.index; package org.neo4j.kernel.api.schema.index;


import java.util.Optional; import java.util.Optional;
import java.util.function.Predicate;


import org.neo4j.internal.kernel.api.IndexOrder; import org.neo4j.internal.kernel.api.IndexOrder;
import org.neo4j.internal.kernel.api.IndexReference; import org.neo4j.internal.kernel.api.IndexReference;
Expand Down Expand Up @@ -202,37 +201,4 @@ public enum Type
GENERAL, GENERAL,
UNIQUE UNIQUE
} }

public enum Filter implements Predicate<IndexDescriptor>
{
GENERAL
{
@Override
public boolean test( IndexDescriptor index )
{
return index.type == Type.GENERAL;
}
},
UNIQUE
{
@Override
public boolean test( IndexDescriptor index )
{
return index.type == Type.UNIQUE;
}
},
ANY
{
@Override
public boolean test( IndexDescriptor index )
{
return true;
}
}
}

public interface Supplier
{
IndexDescriptor getIndexDescriptor();
}
} }
Expand Up @@ -247,11 +247,6 @@ void remove( ExplicitIndexWrite operations, String name, long id, String key )
long id( PropertyContainer entity ); long id( PropertyContainer entity );
} }


public interface Lookup
{
GraphDatabaseService getGraphDatabaseService();
}

protected final String name; protected final String name;
protected final Type<T> type; protected final Type<T> type;
protected final Supplier<KernelTransaction> txBridge; protected final Supplier<KernelTransaction> txBridge;
Expand Down
Expand Up @@ -199,7 +199,7 @@ public RecordStorageEngine(
schemaStorage = new SchemaStorage( neoStores.getSchemaStore() ); schemaStorage = new SchemaStorage( neoStores.getSchemaStore() );


NeoStoreIndexStoreView neoStoreIndexStoreView = new NeoStoreIndexStoreView( lockService, neoStores ); NeoStoreIndexStoreView neoStoreIndexStoreView = new NeoStoreIndexStoreView( lockService, neoStores );
Boolean readOnly = config.get( GraphDatabaseSettings.read_only ) && operationalMode == OperationalMode.single; boolean readOnly = config.get( GraphDatabaseSettings.read_only ) && operationalMode == OperationalMode.single;
monitors.addMonitorListener( new LoggingMonitor( logProvider.getLog( NativeLabelScanStore.class ) ) ); monitors.addMonitorListener( new LoggingMonitor( logProvider.getLog( NativeLabelScanStore.class ) ) );
labelScanStore = new NativeLabelScanStore( pageCache, storeDir, fs, new FullLabelStream( neoStoreIndexStoreView ), labelScanStore = new NativeLabelScanStore( pageCache, storeDir, fs, new FullLabelStream( neoStoreIndexStoreView ),
readOnly, monitors, recoveryCleanupWorkCollector ); readOnly, monitors, recoveryCleanupWorkCollector );
Expand Down
Expand Up @@ -42,6 +42,9 @@
*/ */
public class NodeStore extends CommonAbstractStore<NodeRecord,NoStoreHeader> public class NodeStore extends CommonAbstractStore<NodeRecord,NoStoreHeader>
{ {
public static final String TYPE_DESCRIPTOR = "NodeStore";
private final DynamicArrayStore dynamicLabelStore;

public static Long readOwnerFromDynamicLabelsRecord( DynamicRecord record ) public static Long readOwnerFromDynamicLabelsRecord( DynamicRecord record )
{ {
byte[] data = record.getData(); byte[] data = record.getData();
Expand All @@ -63,15 +66,6 @@ public RecordCursor<DynamicRecord> newLabelCursor()
RecordLoad.NORMAL ); RecordLoad.NORMAL );
} }


public abstract static class Configuration
extends CommonAbstractStore.Configuration
{
}

public static final String TYPE_DESCRIPTOR = "NodeStore";

private final DynamicArrayStore dynamicLabelStore;

public NodeStore( public NodeStore(
File fileName, File fileName,
Config config, Config config,
Expand Down
Expand Up @@ -53,16 +53,6 @@
*/ */
public class EmbeddedGraphDatabase extends GraphDatabaseFacade public class EmbeddedGraphDatabase extends GraphDatabaseFacade
{ {
/**
* Internal constructor used by {@link org.neo4j.graphdb.factory.GraphDatabaseFactory}
*/
public EmbeddedGraphDatabase( String storeDir,
Map<String, String> params,
GraphDatabaseFacadeFactory.Dependencies dependencies )
{
this( new File( storeDir ), params, dependencies );
}

/** /**
* Internal constructor used by {@link org.neo4j.graphdb.factory.GraphDatabaseFactory} * Internal constructor used by {@link org.neo4j.graphdb.factory.GraphDatabaseFactory}
*/ */
Expand Down
85 changes: 0 additions & 85 deletions community/kernel/src/test/java/org/neo4j/test/rule/TimeRule.java

This file was deleted.

This file was deleted.

Expand Up @@ -32,7 +32,6 @@
import org.neo4j.com.storecopy.StoreWriter; import org.neo4j.com.storecopy.StoreWriter;
import org.neo4j.internal.kernel.api.exceptions.TransactionFailureException; import org.neo4j.internal.kernel.api.exceptions.TransactionFailureException;
import org.neo4j.io.fs.FileSystemAbstraction; import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.io.pagecache.PageCache;
import org.neo4j.kernel.NeoStoreDataSource; import org.neo4j.kernel.NeoStoreDataSource;
import org.neo4j.kernel.ha.TransactionChecksumLookup; import org.neo4j.kernel.ha.TransactionChecksumLookup;
import org.neo4j.kernel.ha.com.master.MasterImpl; import org.neo4j.kernel.ha.com.master.MasterImpl;
Expand Down Expand Up @@ -74,7 +73,6 @@ public class DefaultMasterImplSPI implements MasterImpl.SPI
private final File storeDir; private final File storeDir;
private final ResponsePacker responsePacker; private final ResponsePacker responsePacker;
private final Monitors monitors; private final Monitors monitors;
private final PageCache pageCache;


private final TransactionCommitProcess transactionCommitProcess; private final TransactionCommitProcess transactionCommitProcess;
private final CheckPointer checkPointer; private final CheckPointer checkPointer;
Expand All @@ -91,7 +89,6 @@ public DefaultMasterImplSPI( final GraphDatabaseAPI graphDb,
TransactionIdStore transactionIdStore, TransactionIdStore transactionIdStore,
LogicalTransactionStore logicalTransactionStore, LogicalTransactionStore logicalTransactionStore,
NeoStoreDataSource neoStoreDataSource, NeoStoreDataSource neoStoreDataSource,
PageCache pageCache,
StoreCopyCheckPointMutex mutex, StoreCopyCheckPointMutex mutex,
LogProvider logProvider ) LogProvider logProvider )
{ {
Expand All @@ -109,7 +106,6 @@ public DefaultMasterImplSPI( final GraphDatabaseAPI graphDb,
this.txChecksumLookup = new TransactionChecksumLookup( transactionIdStore, logicalTransactionStore ); this.txChecksumLookup = new TransactionChecksumLookup( transactionIdStore, logicalTransactionStore );
this.responsePacker = new ResponsePacker( logicalTransactionStore, transactionIdStore, graphDb::storeId ); this.responsePacker = new ResponsePacker( logicalTransactionStore, transactionIdStore, graphDb::storeId );
this.monitors = monitors; this.monitors = monitors;
this.pageCache = pageCache;
monitors.addMonitorListener( new LoggingStoreCopyServerMonitor( logProvider.getLog( StoreCopyServer.class ) ), monitors.addMonitorListener( new LoggingStoreCopyServerMonitor( logProvider.getLog( StoreCopyServer.class ) ),
StoreCopyServer.class.getName() ); StoreCopyServer.class.getName() );
} }
Expand Down
Expand Up @@ -432,7 +432,6 @@ public void elected( String role, InstanceId instanceId, URI electedMember )
platformModule.dependencies.resolveDependency( TransactionIdStore.class ), platformModule.dependencies.resolveDependency( TransactionIdStore.class ),
platformModule.dependencies.resolveDependency( LogicalTransactionStore.class ), platformModule.dependencies.resolveDependency( LogicalTransactionStore.class ),
platformModule.dependencies.resolveDependency( NeoStoreDataSource.class ), platformModule.dependencies.resolveDependency( NeoStoreDataSource.class ),
platformModule.dependencies.resolveDependency( PageCache.class ),
platformModule.storeCopyCheckPointMutex, platformModule.storeCopyCheckPointMutex,
logging.getInternalLogProvider() ); logging.getInternalLogProvider() );


Expand Down
Expand Up @@ -29,7 +29,6 @@
import org.neo4j.com.storecopy.StoreWriter; import org.neo4j.com.storecopy.StoreWriter;
import org.neo4j.helpers.collection.Iterators; import org.neo4j.helpers.collection.Iterators;
import org.neo4j.io.fs.FileSystemAbstraction; import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.io.pagecache.PageCache;
import org.neo4j.kernel.NeoStoreDataSource; import org.neo4j.kernel.NeoStoreDataSource;
import org.neo4j.kernel.impl.api.TransactionCommitProcess; import org.neo4j.kernel.impl.api.TransactionCommitProcess;
import org.neo4j.kernel.impl.core.LabelTokenHolder; import org.neo4j.kernel.impl.core.LabelTokenHolder;
Expand Down Expand Up @@ -67,7 +66,7 @@ public void flushStoreFilesWithCorrectCheckpointTriggerName() throws IOException
mock( PropertyKeyTokenHolder.class ), mock( RelationshipTypeTokenHolder.class ), mock( PropertyKeyTokenHolder.class ), mock( RelationshipTypeTokenHolder.class ),
mock( IdGeneratorFactory.class ), mock( TransactionCommitProcess.class ), checkPointer, mock( IdGeneratorFactory.class ), mock( TransactionCommitProcess.class ), checkPointer,
mock( TransactionIdStore.class ), mock( LogicalTransactionStore.class ), mock( TransactionIdStore.class ), mock( LogicalTransactionStore.class ),
dataSource, mock( PageCache.class ), new StoreCopyCheckPointMutex(), NullLogProvider.getInstance() ); dataSource, new StoreCopyCheckPointMutex(), NullLogProvider.getInstance() );


master.flushStoresAndStreamStoreFiles( mock( StoreWriter.class ) ); master.flushStoresAndStreamStoreFiles( mock( StoreWriter.class ) );


Expand Down

0 comments on commit 1212b3a

Please sign in to comment.