Examples of SlaveContext


Examples of org.neo4j.com.SlaveContext

        this.graphDb = graphDb;
    }
   
    public Response<Void> fullBackup( StoreWriter writer )
    {
        SlaveContext context = MasterUtil.rotateLogsAndStreamStoreFiles( graphDb, writer );
        writer.done();
        return MasterUtil.packResponse( graphDb, context, null, MasterUtil.ALL );
    }
View Full Code Here

Examples of org.neo4j.com.SlaveContext

        List<Pair<String, Long>> txs = new ArrayList<Pair<String,Long>>();
        for ( XaDataSource ds : dsManager.getAllRegisteredDataSources() )
        {
            txs.add( Pair.of( ds.getName(), ds.getLastCommittedTxId() ) );
        }
        return new SlaveContext( 0, 0, txs.toArray( new Pair[0] ) );
    }
View Full Code Here

Examples of org.neo4j.com.SlaveContext

    }

    private void copyStoreFromMaster( Pair<Master, Machine> master ) throws Exception
    {
        msgLog.logMessage( "Copying store from master" );
        Response<Void> response = master.first().copyStore( new SlaveContext( machineId, 0, new Pair[0] ),
                new ToFileStoreWriter( storeDir ) );
        EmbeddedGraphDatabase tempDb = new EmbeddedGraphDatabase( storeDir );
        try
        {
            MasterUtil.applyReceivedTransactions( response, tempDb, MasterUtil.txHandlerForFullCopy() );
View Full Code Here

Examples of org.neo4j.com.SlaveContext

        int i = 0;
        for ( XaDataSource dataSource : dataSources )
        {
            txs[i++] = Pair.of( dataSource.getName(), dataSource.getLastCommittedTxId() );
        }
        return new SlaveContext( machineId, eventIdentifier, txs );
    }
View Full Code Here

Examples of org.neo4j.com.SlaveContext

    }

    @SuppressWarnings( "unchecked" )
    public Response<Void> copyStore( SlaveContext context, final StoreWriter writer )
    {
        context = new SlaveContext( context.machineId(), context.getEventIdentifier(), new Pair[0] );

        return sendRequest( HaRequestType.COPY_STORE, context, EMPTY_SERIALIZER, new Protocol.FileStreamsDeserializer( writer ) );
    }
View Full Code Here

Examples of org.neo4j.com.SlaveContext

            else
            {
                txs.add( Pair.of( resourceName, dataSource.getLastCommittedTxId() ) );
            }
        }
        return new SlaveContext( context.machineId(), context.getEventIdentifier(),
                txs.toArray( new Pair[0] ) );

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.