Skip to content

Commit

Permalink
More repackaging.
Browse files Browse the repository at this point in the history
  • Loading branch information
apcj committed Jul 31, 2016
1 parent 1240b90 commit 1718ebc
Show file tree
Hide file tree
Showing 227 changed files with 589 additions and 629 deletions.
Expand Up @@ -32,8 +32,8 @@
import org.neo4j.coreedge.core.replication.session.GlobalSession;
import org.neo4j.coreedge.core.replication.session.GlobalSessionTrackerState;
import org.neo4j.coreedge.core.replication.session.LocalSessionPool;
import org.neo4j.coreedge.core.state.tx.ExponentialBackoffStrategy;
import org.neo4j.coreedge.core.state.DurableStateStorage;
import org.neo4j.coreedge.core.state.machines.tx.ExponentialBackoffStrategy;
import org.neo4j.coreedge.core.state.storage.DurableStateStorage;
import org.neo4j.coreedge.core.CoreEdgeClusterSettings;
import org.neo4j.coreedge.identity.MemberId;
import org.neo4j.io.fs.FileSystemAbstraction;
Expand Down
Expand Up @@ -21,12 +21,12 @@

import java.io.IOException;

import org.neo4j.coreedge.catchup.storecopy.core.CoreStateType;
import org.neo4j.coreedge.core.state.snapshot.CoreStateType;
import org.neo4j.coreedge.core.replication.session.GlobalSession;
import org.neo4j.coreedge.core.replication.session.GlobalSessionTrackerState;
import org.neo4j.coreedge.core.replication.session.LocalOperationId;
import org.neo4j.coreedge.core.state.CoreSnapshot;
import org.neo4j.coreedge.core.state.StateStorage;
import org.neo4j.coreedge.core.state.snapshot.CoreSnapshot;
import org.neo4j.coreedge.core.state.storage.StateStorage;

public class SessionTracker implements SnapFlushable
{
Expand Down
Expand Up @@ -21,7 +21,7 @@

import java.io.IOException;

import org.neo4j.coreedge.core.state.CoreSnapshot;
import org.neo4j.coreedge.core.state.snapshot.CoreSnapshot;

public interface SnapFlushable
{
Expand Down
Expand Up @@ -18,7 +18,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.restore;
package org.neo4j.coreedge.backup;

import java.io.File;
import java.io.IOException;
Expand All @@ -40,7 +40,7 @@
import org.neo4j.kernel.api.exceptions.TransactionFailureException;
import org.neo4j.kernel.configuration.Config;
import org.neo4j.kernel.impl.util.Converters;
import org.neo4j.logging.NullLog;
import org.neo4j.restore.RestoreDatabaseCommand;
import org.neo4j.server.configuration.ConfigLoader;

import static org.neo4j.dbms.DatabaseManagementSystemSettings.database_path;
Expand Down Expand Up @@ -95,9 +95,9 @@ public void execute( String[] incomingArguments ) throws IncorrectUsage, Command
throw new IncorrectUsage( "mandatory arguments missing" );
}

String databaseName = args.interpretOption( "database", Converters.<String>mandatory(), s -> s );
String fromPath = args.interpretOption( "from", Converters.<String>mandatory(), s -> s );
String clusterSeed = args.interpretOption( "cluster-seed", Converters.<String>mandatory(), s -> s );
String databaseName = args.interpretOption( "database", Converters.mandatory(), s -> s );
String fromPath = args.interpretOption( "from", Converters.mandatory(), s -> s );
String clusterSeed = args.interpretOption( "cluster-seed", Converters.mandatory(), s -> s );
boolean forceOverwrite = args.getBoolean( "force", Boolean.FALSE, true );

try
Expand Down
Expand Up @@ -18,7 +18,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.restore;
package org.neo4j.coreedge.backup;

import java.io.File;
import java.io.IOException;
Expand All @@ -42,7 +42,7 @@
import org.neo4j.kernel.api.exceptions.TransactionFailureException;
import org.neo4j.kernel.configuration.Config;
import org.neo4j.kernel.impl.util.Converters;
import org.neo4j.logging.NullLog;
import org.neo4j.restore.RestoreDatabaseCommand;
import org.neo4j.server.configuration.ConfigLoader;

import static org.neo4j.dbms.DatabaseManagementSystemSettings.database_path;
Expand Down Expand Up @@ -103,8 +103,8 @@ public void execute( String[] incomingArguments ) throws IncorrectUsage, Command
throw new IncorrectUsage( "mandatory arguments missing" );
}

String databaseName = args.interpretOption( "database", Converters.<String>mandatory(), s -> s );
String fromPath = args.interpretOption( "from", Converters.<String>mandatory(), s -> s );
String databaseName = args.interpretOption( "database", Converters.mandatory(), s -> s );
String fromPath = args.interpretOption( "from", Converters.mandatory(), s -> s );
boolean forceOverwrite = args.getBoolean( "force", Boolean.FALSE, true );

try
Expand Down
Expand Up @@ -35,18 +35,18 @@
import java.util.function.Supplier;

import org.neo4j.coreedge.catchup.storecopy.FileHeaderEncoder;
import org.neo4j.coreedge.catchup.storecopy.core.CoreSnapshotEncoder;
import org.neo4j.coreedge.catchup.storecopy.core.CoreSnapshotRequestDecoder;
import org.neo4j.coreedge.catchup.storecopy.core.CoreSnapshotRequestHandler;
import org.neo4j.coreedge.catchup.storecopy.core.GetStoreIdRequestHandler;
import org.neo4j.coreedge.catchup.storecopy.core.GetStoreRequestHandler;
import org.neo4j.coreedge.catchup.storecopy.core.StoreCopyFinishedResponseEncoder;
import org.neo4j.coreedge.catchup.storecopy.edge.GetStoreIdRequestDecoder;
import org.neo4j.coreedge.catchup.storecopy.edge.GetStoreRequestDecoder;
import org.neo4j.coreedge.catchup.tx.core.TxPullRequestDecoder;
import org.neo4j.coreedge.catchup.tx.core.TxPullRequestHandler;
import org.neo4j.coreedge.catchup.tx.core.TxPullResponseEncoder;
import org.neo4j.coreedge.catchup.tx.edge.TxStreamFinishedResponseEncoder;
import org.neo4j.coreedge.core.state.snapshot.CoreSnapshotEncoder;
import org.neo4j.coreedge.core.state.snapshot.CoreSnapshotRequestDecoder;
import org.neo4j.coreedge.core.state.snapshot.CoreSnapshotRequestHandler;
import org.neo4j.coreedge.catchup.storecopy.GetStoreIdRequestHandler;
import org.neo4j.coreedge.catchup.storecopy.GetStoreRequestHandler;
import org.neo4j.coreedge.catchup.storecopy.StoreCopyFinishedResponseEncoder;
import org.neo4j.coreedge.catchup.storecopy.GetStoreIdRequestDecoder;
import org.neo4j.coreedge.catchup.storecopy.GetStoreRequestDecoder;
import org.neo4j.coreedge.catchup.tx.TxPullRequestDecoder;
import org.neo4j.coreedge.catchup.tx.TxPullRequestHandler;
import org.neo4j.coreedge.catchup.tx.TxPullResponseEncoder;
import org.neo4j.coreedge.catchup.tx.TxStreamFinishedResponseEncoder;
import org.neo4j.coreedge.core.state.CoreState;
import org.neo4j.coreedge.messaging.ListenSocketAddress;
import org.neo4j.coreedge.identity.StoreId;
Expand Down
Expand Up @@ -17,33 +17,32 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.coreedge.catchup.storecopy;
package org.neo4j.coreedge.catchup;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;

import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;

import org.neo4j.coreedge.catchup.RequestMessageType;
import org.neo4j.coreedge.catchup.storecopy.core.CoreSnapshotListener;
import org.neo4j.coreedge.catchup.storecopy.core.CoreSnapshotRequest;
import org.neo4j.coreedge.catchup.storecopy.edge.GetStoreIdRequest;
import org.neo4j.coreedge.catchup.storecopy.edge.GetStoreRequest;
import org.neo4j.coreedge.catchup.storecopy.edge.StoreFileReceiver;
import org.neo4j.coreedge.catchup.storecopy.edge.StoreFileStreamingCompleteListener;
import org.neo4j.coreedge.catchup.storecopy.edge.StoreFileStreams;
import org.neo4j.coreedge.catchup.storecopy.edge.StoreIdReceiver;
import org.neo4j.coreedge.catchup.tx.edge.PullRequestMonitor;
import org.neo4j.coreedge.catchup.tx.edge.TxPullRequest;
import org.neo4j.coreedge.catchup.tx.edge.TxPullResponse;
import org.neo4j.coreedge.catchup.tx.edge.TxPullResponseListener;
import org.neo4j.coreedge.catchup.tx.edge.TxStreamCompleteListener;
import org.neo4j.coreedge.core.state.snapshot.CoreSnapshotListener;
import org.neo4j.coreedge.core.state.snapshot.CoreSnapshotRequest;
import org.neo4j.coreedge.catchup.storecopy.GetStoreIdRequest;
import org.neo4j.coreedge.catchup.storecopy.GetStoreRequest;
import org.neo4j.coreedge.catchup.storecopy.StoreFileReceiver;
import org.neo4j.coreedge.catchup.storecopy.StoreFileStreamingCompleteListener;
import org.neo4j.coreedge.catchup.storecopy.StoreFileStreams;
import org.neo4j.coreedge.catchup.storecopy.StoreIdReceiver;
import org.neo4j.coreedge.catchup.tx.PullRequestMonitor;
import org.neo4j.coreedge.catchup.tx.TxPullRequest;
import org.neo4j.coreedge.catchup.tx.TxPullResponse;
import org.neo4j.coreedge.catchup.tx.TxPullResponseListener;
import org.neo4j.coreedge.catchup.tx.TxStreamCompleteListener;
import org.neo4j.coreedge.discovery.TopologyService;
import org.neo4j.coreedge.messaging.Message;
import org.neo4j.coreedge.raft.net.CoreOutbound;
import org.neo4j.coreedge.raft.net.Outbound;
import org.neo4j.coreedge.core.state.CoreSnapshot;
import org.neo4j.coreedge.core.state.snapshot.CoreSnapshot;
import org.neo4j.coreedge.identity.MemberId;
import org.neo4j.coreedge.messaging.NonBlockingChannels;
import org.neo4j.coreedge.messaging.SenderService;
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.coreedge.catchup.storecopy.core;
package org.neo4j.coreedge.catchup;

import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;
Expand All @@ -27,22 +27,20 @@

import java.util.concurrent.TimeUnit;

import org.neo4j.coreedge.catchup.CatchupClientProtocol;
import org.neo4j.coreedge.catchup.ClientMessageTypeHandler;
import org.neo4j.coreedge.catchup.RequestMessageTypeEncoder;
import org.neo4j.coreedge.catchup.ResponseMessageTypeEncoder;
import org.neo4j.coreedge.catchup.storecopy.CoreClient;
import org.neo4j.coreedge.catchup.storecopy.FileContentHandler;
import org.neo4j.coreedge.catchup.storecopy.FileHeaderDecoder;
import org.neo4j.coreedge.catchup.storecopy.FileHeaderHandler;
import org.neo4j.coreedge.catchup.storecopy.edge.GetStoreRequestEncoder;
import org.neo4j.coreedge.catchup.storecopy.edge.StoreCopyFinishedResponseDecoder;
import org.neo4j.coreedge.catchup.storecopy.edge.StoreCopyFinishedResponseHandler;
import org.neo4j.coreedge.catchup.tx.edge.TxPullRequestEncoder;
import org.neo4j.coreedge.catchup.tx.edge.TxPullResponseDecoder;
import org.neo4j.coreedge.catchup.tx.edge.TxPullResponseHandler;
import org.neo4j.coreedge.catchup.tx.edge.TxStreamFinishedResponseDecoder;
import org.neo4j.coreedge.catchup.tx.edge.TxStreamFinishedResponseHandler;
import org.neo4j.coreedge.catchup.storecopy.GetStoreRequestEncoder;
import org.neo4j.coreedge.catchup.storecopy.StoreCopyFinishedResponseDecoder;
import org.neo4j.coreedge.catchup.storecopy.StoreCopyFinishedResponseHandler;
import org.neo4j.coreedge.catchup.tx.TxPullRequestEncoder;
import org.neo4j.coreedge.catchup.tx.TxPullResponseDecoder;
import org.neo4j.coreedge.catchup.tx.TxPullResponseHandler;
import org.neo4j.coreedge.catchup.tx.TxStreamFinishedResponseDecoder;
import org.neo4j.coreedge.catchup.tx.TxStreamFinishedResponseHandler;
import org.neo4j.coreedge.core.state.snapshot.CoreSnapshotDecoder;
import org.neo4j.coreedge.core.state.snapshot.CoreSnapshotRequestEncoder;
import org.neo4j.coreedge.core.state.snapshot.CoreSnapshotResponseHandler;
import org.neo4j.coreedge.discovery.CoreTopologyService;
import org.neo4j.coreedge.messaging.IdleChannelReaperHandler;
import org.neo4j.coreedge.messaging.NonBlockingChannels;
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.coreedge.catchup.storecopy.edge;
package org.neo4j.coreedge.catchup.storecopy;

import java.io.File;

Expand Down Expand Up @@ -45,7 +45,7 @@ public CopiedStoreRecovery( Config config, Iterable<KernelExtensionFactory<?>> k
this.pageCache = pageCache;
}

public void recoverCopiedStore( File tempStore )
void recoverCopiedStore( File tempStore )
{
try
{
Expand All @@ -67,7 +67,7 @@ public void recoverCopiedStore( File tempStore )

private String failedToStartMessage()
{
String recordFormat = config.get( GraphDatabaseSettings.record_format ).toString();
String recordFormat = config.get( GraphDatabaseSettings.record_format );

return String.format( "Failed to start database with copied store. This may be because the core and edge " +
"servers have a different record format. On this machine: `%s=%s`. Check the equivalent value" +
Expand All @@ -87,7 +87,7 @@ private GraphDatabaseService newTempDatabase( File tempStore )
.setConfig( GraphDatabaseSettings.allow_store_upgrade,
config.get( GraphDatabaseSettings.allow_store_upgrade ).toString() )
.setConfig( GraphDatabaseSettings.record_format,
config.get( GraphDatabaseSettings.record_format ).toString() )
config.get( GraphDatabaseSettings.record_format ) )
.newGraphDatabase();
}
}
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.coreedge.catchup.storecopy.edge;
package org.neo4j.coreedge.catchup.storecopy;

import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;
Expand All @@ -31,15 +31,12 @@
import org.neo4j.coreedge.catchup.ClientMessageTypeHandler;
import org.neo4j.coreedge.catchup.RequestMessageTypeEncoder;
import org.neo4j.coreedge.catchup.ResponseMessageTypeEncoder;
import org.neo4j.coreedge.catchup.storecopy.CoreClient;
import org.neo4j.coreedge.catchup.storecopy.FileContentHandler;
import org.neo4j.coreedge.catchup.storecopy.FileHeaderDecoder;
import org.neo4j.coreedge.catchup.storecopy.FileHeaderHandler;
import org.neo4j.coreedge.catchup.tx.edge.TxPullRequestEncoder;
import org.neo4j.coreedge.catchup.tx.edge.TxPullResponseDecoder;
import org.neo4j.coreedge.catchup.tx.edge.TxPullResponseHandler;
import org.neo4j.coreedge.catchup.tx.edge.TxStreamFinishedResponseDecoder;
import org.neo4j.coreedge.catchup.tx.edge.TxStreamFinishedResponseHandler;
import org.neo4j.coreedge.catchup.CoreClient;
import org.neo4j.coreedge.catchup.tx.TxPullRequestEncoder;
import org.neo4j.coreedge.catchup.tx.TxPullResponseDecoder;
import org.neo4j.coreedge.catchup.tx.TxPullResponseHandler;
import org.neo4j.coreedge.catchup.tx.TxStreamFinishedResponseDecoder;
import org.neo4j.coreedge.catchup.tx.TxStreamFinishedResponseHandler;
import org.neo4j.coreedge.discovery.EdgeTopologyService;
import org.neo4j.coreedge.messaging.IdleChannelReaperHandler;
import org.neo4j.coreedge.messaging.NonBlockingChannels;
Expand Down
Expand Up @@ -25,7 +25,6 @@
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

import org.neo4j.coreedge.catchup.storecopy.edge.StoreFileReceiver;
import org.neo4j.coreedge.catchup.CatchupClientProtocol;

import static org.neo4j.coreedge.catchup.CatchupClientProtocol.NextMessage;
Expand All @@ -44,7 +43,7 @@ public FileContentHandler( CatchupClientProtocol protocol, StoreFileReceiver loc
this.location = location;
}

public void setExpectedFile( FileHeader fileHeader )
void setExpectedFile( FileHeader fileHeader )
{
this.expectedBytes = fileHeader.fileLength();
this.destination = fileHeader.fileName();
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.coreedge.catchup.storecopy.edge;
package org.neo4j.coreedge.catchup.storecopy;

import org.neo4j.coreedge.catchup.RequestMessageType;
import org.neo4j.coreedge.messaging.Message;
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.coreedge.catchup.storecopy.edge;
package org.neo4j.coreedge.catchup.storecopy;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
Expand Down
Expand Up @@ -17,15 +17,15 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.coreedge.catchup.storecopy.edge;
package org.neo4j.coreedge.catchup.storecopy;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToMessageEncoder;

import java.util.List;

public class GetStoreIdRequestEncoder extends MessageToMessageEncoder<GetStoreIdRequest>
class GetStoreIdRequestEncoder extends MessageToMessageEncoder<GetStoreIdRequest>
{
@Override
protected void encode( ChannelHandlerContext ctx, GetStoreIdRequest msg, List<Object> out ) throws Exception
Expand Down
Expand Up @@ -17,7 +17,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.coreedge.catchup.storecopy.core;
package org.neo4j.coreedge.catchup.storecopy;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
Expand All @@ -26,7 +26,7 @@

import org.neo4j.coreedge.catchup.CatchupServerProtocol;
import org.neo4j.coreedge.catchup.ResponseMessageType;
import org.neo4j.coreedge.catchup.storecopy.edge.GetStoreIdRequest;
import org.neo4j.coreedge.messaging.NetworkFlushableByteBuf;
import org.neo4j.coreedge.messaging.marsalling.storeid.StoreIdMarshal;
import org.neo4j.coreedge.identity.StoreId;

Expand Down
Expand Up @@ -17,17 +17,17 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.coreedge.catchup.storecopy.edge;
package org.neo4j.coreedge.catchup.storecopy;

import java.util.Objects;

import org.neo4j.coreedge.identity.StoreId;

public class GetStoreIdResponse
class GetStoreIdResponse
{
private final StoreId storeId;

public GetStoreIdResponse( StoreId storeId )
GetStoreIdResponse( StoreId storeId )
{
this.storeId = storeId;
}
Expand Down

0 comments on commit 1718ebc

Please sign in to comment.