Skip to content

Commit

Permalink
Hide classes that really should not be public from the public API.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvest committed Dec 7, 2017
1 parent 22265cc commit ceabe8c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</module>

<module name="TreeWalker">

<module name="SuppressionCommentFilter"/>
<module name="PackageDeclaration"/>
<module name="UpperEll"/>
<module name="ArrayTypeStyle"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import java.io.OutputStream;
import java.io.Writer;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Objects;
Expand All @@ -42,15 +41,13 @@
import org.neo4j.io.fs.DefaultFileSystemAbstraction;
import org.neo4j.kernel.configuration.Config;

import static java.lang.String.format;

/**
* This class encapsulates the information needed to perform an online backup against a running Neo4j instance
* configured to act as a backup server.
* <p>
* All backup methods return the same instance, allowing for chaining calls.
*/
public class OnlineBackupCommandBuilder
class OnlineBackupCommandBuilder
{
private String host;
private Integer port;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,17 @@
import static java.lang.String.format;
import static org.neo4j.backup.BackupSupportingClassesFactoryProvider.getProvidersByPriority;

public class OnlineBackupCommandProvider extends AdminCommand.Provider
class OnlineBackupCommandProvider extends AdminCommand.Provider
{
// CHECKSTYLE:OFF
// Checkstyle complains that the `public` modifier is redundant since this class is package private.
// However, what Checkstyle doesn't know, is that this class is service loaded, and this *requires*
// a public no-arg constructor to work.
public OnlineBackupCommandProvider()
{
super( "backup" );
}
// CHECKSTYLE:ON

@Override
@Nonnull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
/**
* An outside world where you can pick and choose which input/output are dummies.
*/
public class ParametrisedOutsideWorld implements OutsideWorld
class ParametrisedOutsideWorld implements OutsideWorld
{

private final PrintStream stdout;
private final PrintStream stderr;
private final Console stdin;
private final FileSystemAbstraction fileSystemAbstraction;

public ParametrisedOutsideWorld( StringBuilder stdout, StringBuilder stderr )
ParametrisedOutsideWorld( StringBuilder stdout, StringBuilder stderr )
{
this( System.console(), streamFromBuilder( stdout ), streamFromBuilder( stderr ), new DefaultFileSystemAbstraction() );
}
Expand All @@ -57,15 +57,15 @@ public void write( int i ) throws IOException
};
}

public ParametrisedOutsideWorld( Console stdin, OutputStream stdout, OutputStream stderr, FileSystemAbstraction fileSystemAbstraction )
ParametrisedOutsideWorld( Console stdin, OutputStream stdout, OutputStream stderr, FileSystemAbstraction fileSystemAbstraction )
{
this.stdout = new PrintStream( stdout );
this.stderr = new PrintStream( stderr );
this.fileSystemAbstraction = fileSystemAbstraction;
this.stdin = stdin;
}

public ParametrisedOutsideWorld( PrintStream stdout, PrintStream stderr )
ParametrisedOutsideWorld( PrintStream stdout, PrintStream stderr )
{
this( System.console(), stdout, stderr, new DefaultFileSystemAbstraction() );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@
* Full backup will stream at most N transactions back, even if nothing happened during the backup.
* Streaming these transaction aren't as important, since they are mostly a nice-to-have.
*/
public class StoreCopyResponsePacker extends ResponsePacker
class StoreCopyResponsePacker extends ResponsePacker
{
private final long mandatoryStartTransactionId;
private final LogFileInformation logFileInformation;
private final TransactionIdStore transactionIdStore;
private final Monitor monitor;

public StoreCopyResponsePacker( LogicalTransactionStore transactionStore,
StoreCopyResponsePacker( LogicalTransactionStore transactionStore,
TransactionIdStore transactionIdStore, LogFileInformation logFileInformation,
Supplier<StoreId> storeId, long mandatoryStartTransactionId, StoreCopyServer.Monitor monitor )
{
Expand Down

0 comments on commit ceabe8c

Please sign in to comment.