Skip to content

Javadocs for async API, removed unused classes and methods #444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions driver/src/main/java/org/neo4j/driver/ResultResourcesHandler.java

This file was deleted.

42 changes: 0 additions & 42 deletions driver/src/main/java/org/neo4j/driver/StatementKeys.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import java.util.Objects;

import org.neo4j.driver.v1.util.Function;
import org.neo4j.driver.v1.util.Pair;

public class InternalPair<K, V> implements Pair<K, V>
Expand Down Expand Up @@ -57,11 +56,6 @@ public String toString()
return String.format( "%s: %s", Objects.toString( key ), Objects.toString( value ) );
}

public String toString( Function<V, String> printValue )
{
return String.format( "%s: %s", key, printValue.apply( value ) );
}

@Override
public boolean equals( Object o )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import org.neo4j.driver.internal.spi.Connection;
import org.neo4j.driver.internal.util.Clock;
import org.neo4j.driver.v1.Logger;
import org.neo4j.driver.v1.Record;
import org.neo4j.driver.v1.Statement;
import org.neo4j.driver.v1.exceptions.ProtocolException;
Expand All @@ -37,18 +36,16 @@ public class RoutingProcedureClusterCompositionProvider implements ClusterCompos
private static final String PROTOCOL_ERROR_MESSAGE = "Failed to parse '%s' result received from server due to ";

private final Clock clock;
private final Logger log;
private final RoutingProcedureRunner routingProcedureRunner;

public RoutingProcedureClusterCompositionProvider( Clock clock, Logger log, RoutingSettings settings )
public RoutingProcedureClusterCompositionProvider( Clock clock, RoutingSettings settings )
{
this( clock, log, new RoutingProcedureRunner( settings.routingContext() ) );
this( clock, new RoutingProcedureRunner( settings.routingContext() ) );
}

RoutingProcedureClusterCompositionProvider( Clock clock, Logger log, RoutingProcedureRunner routingProcedureRunner )
RoutingProcedureClusterCompositionProvider( Clock clock, RoutingProcedureRunner routingProcedureRunner )
{
this.clock = clock;
this.log = log;
this.routingProcedureRunner = routingProcedureRunner;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ private static Rediscovery createRediscovery( BoltServerAddress initialRouter, R
{
Logger log = loadBalancerLogger( logging );
ClusterCompositionProvider clusterCompositionProvider =
new RoutingProcedureClusterCompositionProvider( clock, log, settings );
new RoutingProcedureClusterCompositionProvider( clock, settings );
return new Rediscovery( initialRouter, settings, clusterCompositionProvider, eventExecutorGroup,
new DnsResolver( log ), log );
}
Expand Down
41 changes: 0 additions & 41 deletions driver/src/main/java/org/neo4j/driver/internal/util/Consumers.java

This file was deleted.

11 changes: 0 additions & 11 deletions driver/src/main/java/org/neo4j/driver/internal/util/Iterables.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

import org.neo4j.driver.v1.util.Function;

Expand Down Expand Up @@ -108,14 +107,4 @@ public void remove()
}
};
}

public static <K, A, B> Map<K,B> mapValues( Map<K,A> map, Function<A,B> f )
{
HashMap<K,B> transformed = new HashMap<>( map.size() );
for ( Entry<K,A> entry : map.entrySet() )
{
transformed.put( entry.getKey(), f.apply( entry.getValue() ) );
}
return transformed;
}
}
13 changes: 12 additions & 1 deletion driver/src/main/java/org/neo4j/driver/v1/Driver.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,20 @@ public interface Driver extends AutoCloseable
Session session( AccessMode mode, Iterable<String> bookmarks );

/**
* Close all the resources assigned to this driver, including any open connections.
* Close all the resources assigned to this driver, including open connections and IO threads.
* <p>
* This operation works the same way as {@link #closeAsync()} but blocks until all resources are closed.
*/
@Override
void close();

/**
* Close all the resources assigned to this driver, including open connections and IO threads.
* <p>
* This operation is asynchronous and returns a {@link CompletionStage}. This stage is completed with
* {@code null} when all resources are closed. It is completed exceptionally if termination fails.
*
* @return a {@link CompletionStage completion stage} that represents the asynchronous close.
*/
CompletionStage<Void> closeAsync();
}
24 changes: 0 additions & 24 deletions driver/src/main/java/org/neo4j/driver/v1/ResponseListener.java

This file was deleted.

Loading