Unnamed: 0 int64 0 6.7k | func stringlengths 12 89.6k | target bool 2
classes | project stringlengths 45 151 |
|---|---|---|---|
4,300 | omega
{
@Override
public State<?, ?> handle( OmegaContext context, Message<OmegaMessage> message,
MessageHolder outgoing ) throws Throwable
{
switch ( message.getMessageType() )
... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_omega_OmegaState.java |
4,301 | public class OmegaMessageTest
{
} | false | enterprise_cluster_src_test_java_org_neo4j_cluster_protocol_omega_OmegaMessageTest.java |
4,302 | public class OmegaContextTest
{
@Test
public void testOrderingOfEpochNumberOnSerialNum()
{
List<EpochNumber> toSort = new LinkedList<EpochNumber>();
// Creates a list in order 5,4,6,3,7,2,8,1,9
for ( int i = 1; i < 10; i++ )
{
// The sign code is lame, but i could... | false | enterprise_cluster_src_test_java_org_neo4j_cluster_protocol_omega_OmegaContextTest.java |
4,303 | private static final class RefreshRoundContext
{
int acksReceived;
} | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_omega_OmegaContext.java |
4,304 | public class OmegaContext
{
public void startTimers()
{
}
public void roundDone( int refreshRound )
{
refreshContexts.remove( refreshRound );
}
public Iterable<? extends URI> getServers()
{
return clusterContext.getMemberURIs();
}
public State getMyState()
... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_omega_OmegaContext.java |
4,305 | public class MessageArgumentMatcher<T extends MessageType> extends ArgumentMatcher<Message<T>>
{
private URI from;
private URI to;
private T theMessageType;
private Serializable payload;
public MessageArgumentMatcher<T> from( URI from )
{
this.from = from;
return this;
}
... | false | enterprise_cluster_src_test_java_org_neo4j_cluster_protocol_omega_MessageArgumentMatcher.java |
4,306 | public class CollectionRound
{
private final Map<URI, View> oldViews;
private final Set<URI> responders;
private final int collectionRound;
public CollectionRound( Map<URI, View> oldViews, int collectionRound )
{
this.oldViews = oldViews;
this.collectionRound = collectionRound;
... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_omega_CollectionRound.java |
4,307 | public class HeartbeatStateTest
{
@Test
public void shouldIgnoreSuspicionsForOurselves() throws Throwable
{
// Given
InstanceId instanceId = new InstanceId( 1 );
HeartbeatState heartbeat= HeartbeatState.heartbeat;
ClusterConfiguration configuration = new ClusterConfiguration(... | false | enterprise_cluster_src_test_java_org_neo4j_cluster_protocol_heartbeat_HeartbeatStateTest.java |
4,308 | heartbeat
{
@Override
public HeartbeatState handle( HeartbeatContext context,
Message<HeartbeatMessage> message,
MessageHolder outgoing
)
th... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_heartbeat_HeartbeatState.java |
4,309 | start
{
@Override
public HeartbeatState handle( HeartbeatContext context,
Message<HeartbeatMessage> message,
MessageHolder outgoing
)
throws... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_heartbeat_HeartbeatState.java |
4,310 | public class HeartbeatRefreshProcessor implements MessageProcessor
{
private final MessageHolder outgoing;
private final ClusterContext clusterContext;
public HeartbeatRefreshProcessor( MessageHolder outgoing, ClusterContext clusterContext )
{
this.outgoing = outgoing;
this.clusterConte... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_heartbeat_HeartbeatRefreshProcessor.java |
4,311 | public static class SuspicionsState
implements Serializable
{
private static final long serialVersionUID = 3152836192116904427L;
private Set<InstanceId> suspicions;
public SuspicionsState( Set<InstanceId> suspicions )
{
this.suspicions = suspicions;
... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_heartbeat_HeartbeatMessage.java |
4,312 | public static class IAmAliveState
implements Serializable
{
private final InstanceId server;
public IAmAliveState( InstanceId server )
{
this.server = server;
}
public InstanceId getServer()
{
return server;
}
... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_heartbeat_HeartbeatMessage.java |
4,313 | public static class Adapter implements HeartbeatListener
{
@Override
public void failed( InstanceId server )
{
}
@Override
public void alive( InstanceId server )
{
}
} | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_heartbeat_HeartbeatListener.java |
4,314 | public class HeartbeatJoinListener extends ClusterListener.Adapter
{
private final MessageHolder outgoing;
public HeartbeatJoinListener( MessageHolder outgoing )
{
this.outgoing = outgoing;
}
@Override
public void joinedCluster( InstanceId member, URI atUri )
{
outgoing.off... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_heartbeat_HeartbeatJoinListener.java |
4,315 | {{
put( new InstanceId( 1 ), URI.create( "ha://1" ) );
put( new InstanceId( 2 ), URI.create( "ha://2" ) );
}} | false | enterprise_cluster_src_test_java_org_neo4j_cluster_protocol_heartbeat_HeartbeatIAmAliveProcessorTest.java |
4,316 | {
@Override
public Object answer( InvocationOnMock invocation ) throws Throwable
{
sentOut.add( (Message) invocation.getArguments()[0] );
return null;
}
} ).when( holder ).offer( Matchers.<Message<MessageType>>any() ); | false | enterprise_cluster_src_test_java_org_neo4j_cluster_protocol_heartbeat_HeartbeatIAmAliveProcessorTest.java |
4,317 | {{
put( new InstanceId( 1 ), URI.create( "ha://1" ) );
put( new InstanceId( 2 ), URI.create( "ha://2" ) );
}} | false | enterprise_cluster_src_test_java_org_neo4j_cluster_protocol_heartbeat_HeartbeatIAmAliveProcessorTest.java |
4,318 | {
@Override
public Object answer( InvocationOnMock invocation ) throws Throwable
{
sentOut.add( (Message) invocation.getArguments()[0] );
return null;
}
} ).when( holder ).offer( Matchers.<Message<MessageType>>any() ); | false | enterprise_cluster_src_test_java_org_neo4j_cluster_protocol_heartbeat_HeartbeatIAmAliveProcessorTest.java |
4,319 | {{
put( new InstanceId( 1 ), URI.create( "ha://1" ) );
put( new InstanceId( 2 ), URI.create( "ha://2" ) );
}} | false | enterprise_cluster_src_test_java_org_neo4j_cluster_protocol_heartbeat_HeartbeatIAmAliveProcessorTest.java |
4,320 | start
{
@Override
public OmegaState handle( OmegaContext context, Message<OmegaMessage> message,
MessageHolder outgoing ) throws Throwable
{
switch ( message.getMessageType() )
... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_omega_OmegaState.java |
4,321 | public class OmegaStateTest
{
@Test
public void testStartTransition() throws Throwable
{
OmegaContext context = Mockito.mock( OmegaContext.class );
Message<OmegaMessage> message = Message.internal( OmegaMessage.start );
MessageHolder outgoing = Mockito.mock( MessageHolder.class );
... | false | enterprise_cluster_src_test_java_org_neo4j_cluster_protocol_omega_OmegaStateTest.java |
4,322 | private class StateMachineRule
implements StateTransitionListener
{
State<?,?> oldState;
MessageType messageType;
State<?,?> newState;
Message<?>[] messages;
private StateMachineRule( State<?, ?> oldState, MessageType messageType, State<?, ?> newState, Message<?... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_statemachine_StateMachineRules.java |
4,323 | public class RefreshRound
{
} | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_omega_RefreshRound.java |
4,324 | public class StateMachineRules
implements StateTransitionListener
{
private final MessageHolder outgoing;
private Map<State<?,?>,List<StateMachineRule>> rules = new HashMap<State<?, ?>, List<StateMachineRule>>( );
public StateMachineRules( MessageHolder outgoing )
{
this.outgoing = outgoi... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_statemachine_StateMachineRules.java |
4,325 | public class StateMachineProxyHandler
implements InvocationHandler
{
private StateMachineProxyFactory stateMachineProxyFactory;
private StateMachine stateMachine;
public StateMachineProxyHandler( StateMachineProxyFactory stateMachineProxyFactory, StateMachine stateMachine )
{
this.state... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_statemachine_StateMachineProxyHandler.java |
4,326 | class ResponseFuture
implements Future<Object>
{
private final String conversationId;
private final MessageType initiatedByMessageType;
private Message response;
ResponseFuture( String conversationId, MessageType initiatedByMessageType )
{
this.c... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_statemachine_StateMachineProxyFactory.java |
4,327 | public class StateMachineProxyFactory
implements MessageProcessor
{
private final StateMachines stateMachines;
private final StateMachineConversations conversations;
private volatile InstanceId me;
private final Map<String, ResponseFuture> responseFutureMap = new ConcurrentHashMap<String, Respo... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_statemachine_StateMachineProxyFactory.java |
4,328 | public class StateMachineConversations
{
private final AtomicLong nextConversationId = new AtomicLong();
private final String serverId;
public StateMachineConversations( InstanceId me )
{
serverId = me.toString();
}
public String getNextConversationId()
{
return serverId + ... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_statemachine_StateMachineConversations.java |
4,329 | public class StateMachine
{
private Object context;
private Class<? extends MessageType> messageEnumType;
private State<?, ?> state;
private Logging logging;
private List<StateTransitionListener> listeners = new ArrayList<StateTransitionListener>();
public StateMachine( Object context, Class<?... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_statemachine_StateMachine.java |
4,330 | public class SnapshotStateTest
{
@Test
public void testNoSnapshotRequestIfCoordinatorInExistingCluster() throws Throwable
{
Map<InstanceId, URI> extraMember = new HashMap<InstanceId, URI>();
URI other = URI.create( "cluster://other");
extraMember.put( new InstanceId( 2 ), other );
... | false | enterprise_cluster_src_test_java_org_neo4j_cluster_protocol_snapshot_SnapshotStateTest.java |
4,331 | ready
{
@Override
public State<?, ?> handle( SnapshotContext context,
Message<SnapshotMessage> message,
MessageHolder outgoing
)
throws Throwable
... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_snapshot_SnapshotState.java |
4,332 | refreshing
{
@Override
public State<?, ?> handle( SnapshotContext context,
Message<SnapshotMessage> message,
MessageHolder outgoing
)
throws Throw... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_snapshot_SnapshotState.java |
4,333 | start
{
@Override
public State<?, ?> handle( SnapshotContext context,
Message<SnapshotMessage> message,
MessageHolder outgoing
)
throws Throwable
... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_snapshot_SnapshotState.java |
4,334 | public static class SnapshotState
implements Serializable
{
private long lastDeliveredInstanceId = -1;
transient SnapshotProvider provider;
private transient ObjectInputStreamFactory objectInputStreamFactory;
private transient ObjectOutputStreamFactory objectOutputSt... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_snapshot_SnapshotMessage.java |
4,335 | public class SnapshotContext
{
private SnapshotProvider snapshotProvider;
private ClusterContext clusterContext;
private LearnerContext learnerContext;
public SnapshotContext( ClusterContext clusterContext, LearnerContext learnerContext )
{
this.clusterContext = clusterContext;
this... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_snapshot_SnapshotContext.java |
4,336 | public class View
{
private final State state;
private boolean expired;
public View( State state )
{
this(state, true);
}
public View( State state, boolean expired )
{
this.state = state;
this.expired = expired;
}
public State getState()
{
retur... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_omega_state_View.java |
4,337 | public class State implements Comparable<State>
{
private final EpochNumber epochNum;
private int freshness;
public State( EpochNumber epochNum, int freshness )
{
this.epochNum = epochNum;
this.freshness = freshness;
}
public State( EpochNumber epochNum )
{
this( ep... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_omega_state_State.java |
4,338 | public class EpochNumber implements Comparable<EpochNumber>
{
private int serialNum;
private final int processId;
public EpochNumber( int serialNum, int processId )
{
this.serialNum = serialNum;
this.processId = processId;
}
public EpochNumber( int processId )
{
thi... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_omega_state_EpochNumber.java |
4,339 | public final class RefreshPayload implements Serializable
{
public final int serialNum;
public final int processId;
public final int freshness;
public final int refreshRound;
public RefreshPayload( int serialNum, int processId, int freshness, int refreshRound )
{
this.serialNum = serial... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_omega_payload_RefreshPayload.java |
4,340 | public final class RefreshAckPayload implements Serializable
{
public final int round;
public RefreshAckPayload( int round )
{
this.round = round;
}
public static RefreshAckPayload forRefresh( RefreshPayload payload )
{
return new RefreshAckPayload( payload.refreshRound );
... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_omega_payload_RefreshAckPayload.java |
4,341 | public final class CollectResponsePayload implements Serializable
{
private final URI[] servers;
private final RefreshPayload[] registry;
private final int readNum;
public CollectResponsePayload( URI[] servers, RefreshPayload[] registry, int readNum )
{
this.servers = servers;
this.... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_omega_payload_CollectResponsePayload.java |
4,342 | public class CollectPayload implements Serializable
{
private final int readNum;
public CollectPayload( int readNum )
{
this.readNum = readNum;
}
public int getReadNum()
{
return readNum;
}
@Override
public boolean equals( Object obj )
{
if (obj == null... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_protocol_omega_payload_CollectPayload.java |
4,343 | {
@Override
public void run()
{
try
{
Thread.sleep( 100 );
}
catch ( InterruptedException e )
{
Thread.interrupted();
}
shut... | false | enterprise_com_src_test_java_org_neo4j_com_MadeUpServerProcess.java |
4,344 | public class Protocol
{
public static final int MEGA = 1024 * 1024;
public static final int DEFAULT_FRAME_LENGTH = 16*MEGA;
private final int chunkSize;
private final byte applicationProtocolVersion;
private final byte internalProtocolVersion;
public Protocol( int chunkSize, byte applicationPr... | false | enterprise_com_src_main_java_org_neo4j_com_Protocol.java |
4,345 | {
@Override
protected Triplet<String, Long, TxExtractor> fetchNextOrNull()
{
makeSureNextTransactionIsFullyFetched( buffer );
String datasource = datasources[buffer.readUnsignedByte()];
if ( datasource == null )
... | false | enterprise_com_src_main_java_org_neo4j_com_Protocol.java |
4,346 | public static class MyDSExtension implements Lifecycle
{
public static class Factory extends KernelExtensionFactory<Factory.Dependencies>
{
private final File logWriterTarget;
public interface Dependencies
{
XaDataSourceManager getXaDataSource... | false | enterprise_com_src_test_java_org_neo4j_com_storecopy_ThirdPartyDSStoreCopyIT.java |
4,347 | public class ThirdPartyDSStoreCopyIT
{
@Rule
public TargetDirectory.TestDirectory testDir = TargetDirectory.testDirForTest( getClass() );
private final DefaultFileSystemAbstraction fs = new DefaultFileSystemAbstraction();
@Test
public void shouldStoreLogFilesAndRunRecovery() throws Exception
{
... | false | enterprise_com_src_test_java_org_neo4j_com_storecopy_ThirdPartyDSStoreCopyIT.java |
4,348 | {
public Response<Object> response;
@Override
public Response<?> copyStore( StoreWriter writer )
{
// Data that should be available in the store files
try ( Transaction tx = original.beginTx() )
{
... | false | enterprise_com_src_test_java_org_neo4j_com_storecopy_RemoteStoreCopierTest.java |
4,349 | public class RemoteStoreCopierTest
{
@Rule
public TargetDirectory.TestDirectory testDir = TargetDirectory.testDirForTest( getClass() );
private final DefaultFileSystemAbstraction fs = new DefaultFileSystemAbstraction();
@Test
public void shouldStoreLogFilesAndRunRecovery() throws Exception
{
... | false | enterprise_com_src_test_java_org_neo4j_com_storecopy_RemoteStoreCopierTest.java |
4,350 | {
private int totalFiles;
@Override
public int write( String path, ReadableByteChannel data, ByteBuffer temporaryBuffer,
boolean hasData ) throws IOException
{
console.log( "Copying " + path );
int wri... | false | enterprise_com_src_main_java_org_neo4j_com_storecopy_RemoteStoreCopier.java |
4,351 | {
@Override
public boolean accept( File file )
{
// Skip log files and tx files from temporary database
return !file.getName().startsWith( "metrics" )
&& !file.getName().equals( StringLogger.DEFAULT_NAME )
... | false | enterprise_com_src_main_java_org_neo4j_com_storecopy_RemoteStoreCopier.java |
4,352 | public class RemoteStoreCopier
{
public static final String COPY_FROM_MASTER_TEMP = "temp-copy";
private final Config config;
private final Iterable<KernelExtensionFactory<?>> kernelExtensions;
private final ConsoleLogger console;
private final FileSystemAbstraction fs;
/**
* This is built... | false | enterprise_com_src_main_java_org_neo4j_com_storecopy_RemoteStoreCopier.java |
4,353 | public class TxExtractorTest
{
@Test
public void shouldExtractToLogBuffer() throws Exception
{
// Given
InMemoryLogBuffer input = new InMemoryLogBuffer(),
output = new InMemoryLogBuffer();
input.putLong( 1337l );
TxExtractor extractor = TxExtractor... | false | enterprise_com_src_test_java_org_neo4j_com_TxExtractorTest.java |
4,354 | {
@Override
public ReadableByteChannel extract()
{
return data;
}
@Override
public void extract( LogBuffer buffer )
{
int transferBufSize = 128;
ByteBuffer transferBuffer = ByteBu... | false | enterprise_com_src_main_java_org_neo4j_com_TxExtractor.java |
4,355 | public abstract class TxExtractor
{
public abstract void extract( LogBuffer buffer );
public abstract ReadableByteChannel extract();
public static TxExtractor create( final ReadableByteChannel data )
{
return new TxExtractor()
{
@Override
public ReadableByteChan... | false | enterprise_com_src_main_java_org_neo4j_com_TxExtractor.java |
4,356 | {
@Override
public void assertMatch( long txId, int masterId, long checksum )
{
}
}; | false | enterprise_com_src_main_java_org_neo4j_com_TxChecksumVerifier.java |
4,357 | {
@Override
protected Triplet<String, Long, TxExtractor> fetchNextOrNull()
{
if ( stream.hasNext() ) return stream.next();
return null;
}
}; | false | enterprise_com_src_main_java_org_neo4j_com_TransactionStream.java |
4,358 | {
@Override
protected Triplet<String, Long, TxExtractor> fetchNextOrNull()
{
return null;
}
}; | false | enterprise_com_src_main_java_org_neo4j_com_TransactionStream.java |
4,359 | public abstract class TransactionStream extends
PrefetchingIterator<Triplet<String/*datasource*/, Long/*txid*/, TxExtractor>>
{
public static final TransactionStream EMPTY = new TransactionStream()
{
@Override
protected Triplet<String, Long, TxExtractor> fetchNextOrNull()
{
... | false | enterprise_com_src_main_java_org_neo4j_com_TransactionStream.java |
4,360 | public class TransactionNotPresentOnMasterException extends IllegalStateException
{
public TransactionNotPresentOnMasterException( RequestContext txId )
{
super( "Transaction " + txId + " not present on master" );
}
} | false | enterprise_com_src_main_java_org_neo4j_com_TransactionNotPresentOnMasterException.java |
4,361 | public class ToChannelBufferWriter implements MadeUpWriter
{
private final ChannelBuffer target;
public ToChannelBufferWriter( ChannelBuffer target )
{
this.target = target;
}
@Override
public void write( ReadableByteChannel data )
{
BlockLogBuffer blockBuffer = new BlockLo... | false | enterprise_com_src_test_java_org_neo4j_com_ToChannelBufferWriter.java |
4,362 | public class ToAssertionWriter implements MadeUpWriter
{
private int index;
@Override
public void write( ReadableByteChannel data )
{
ByteBuffer intermediate = ByteBuffer.allocate( 1000 );
while ( true )
{
try
{
intermediate.clear();
... | false | enterprise_com_src_test_java_org_neo4j_com_ToAssertionWriter.java |
4,363 | public class TestSlaveContext
{
@SuppressWarnings( "unchecked" )
@Test
public void assertSimilarity()
{
// Different machine ids
assertFalse( new RequestContext( 1234, 1, 2, new RequestContext.Tx[0], 0, 0 ).equals( new RequestContext( 1234, 2, 2, new RequestContext.Tx[0], 0, 0 ) ) );
... | false | enterprise_com_src_test_java_org_neo4j_com_TestSlaveContext.java |
4,364 | class Builder
{
private final int port;
private final int chunkSize;
private final byte internalProtocolVersion;
private final byte applicationProtocolVersion;
private final TxChecksumVerifier verifier;
private final StoreId storeId;
public Builde... | false | enterprise_com_src_test_java_org_neo4j_com_TestCommunication.java |
4,365 | {
@Override
public void assertMatch( long txId, int masterId, long checksum )
{
throw new FailingException( failureMessage );
}
}; | false | enterprise_com_src_test_java_org_neo4j_com_TestCommunication.java |
4,366 | {
@Override
public Response<?> copyStore( StoreWriter writer )
{
GraphDatabaseAPI original = (GraphDatabaseAPI)new GraphDatabaseFactory()
.addKernelExtension( new MyDSExtension.Factory( new File( testDir.directory(), "irrelephant.log" )... | false | enterprise_com_src_test_java_org_neo4j_com_storecopy_ThirdPartyDSStoreCopyIT.java |
4,367 | public static class Factory extends KernelExtensionFactory<Factory.Dependencies>
{
private final File logWriterTarget;
public interface Dependencies
{
XaDataSourceManager getXaDataSourceManager();
}
public Factory( File logWri... | false | enterprise_com_src_test_java_org_neo4j_com_storecopy_ThirdPartyDSStoreCopyIT.java |
4,368 | {
@SuppressWarnings( "boxing" )
public void write( Integer responseObject, ChannelBuffer result ) throws IOException
{
result.writeInt( responseObject );
}
}; | false | enterprise_com_src_main_java_org_neo4j_com_Protocol.java |
4,369 | public static class MyDataSource extends XaDataSource
{
private final File logWriterTarget;
public MyDataSource( File logWriterTarget )
{
super( "my-ds".getBytes(), "my-ds" );
this.logWriterTarget = logWriterTarget;
}
@Override
public lon... | false | enterprise_com_src_test_java_org_neo4j_com_storecopy_ThirdPartyDSStoreCopyIT.java |
4,370 | public class ConsistencyCheckToolTest
{
@Test
public void runsConsistencyCheck() throws Exception
{
// given
String storeDirectoryPath = storeDirectory.directory().getPath();
String[] args = {storeDirectoryPath};
ConsistencyCheckService service = mock( ConsistencyCheckService... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_ConsistencyCheckToolTest.java |
4,371 | static class ToolFailureException extends Exception
{
ToolFailureException( String message )
{
super( message );
}
ToolFailureException( String message, Throwable cause )
{
super( message, cause );
}
void haltJVM()
{
... | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_ConsistencyCheckTool.java |
4,372 | public class ConsistencyCheckTool
{
private static final String RECOVERY = "recovery";
private static final String CONFIG = "config";
public static void main( String[] args )
{
ConsistencyCheckTool tool = new ConsistencyCheckTool( new ConsistencyCheckService(), System.err );
try
... | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_ConsistencyCheckTool.java |
4,373 | public class ConsistencyCheckSettings
{
@Description("Perform optional additional checking on property ownership. " +
"This can detect a theoretical inconsistency where a property could be owned by multiple entities. " +
"However, but the check is very expensive in time and memory, so it is ... | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_ConsistencyCheckSettings.java |
4,374 | {
@Override
protected void generateInitialData( GraphDatabaseService graphDb )
{
org.neo4j.graphdb.Transaction tx = graphDb.beginTx();
try
{
Node node1 = set( graphDb.createNode() );
Node node2 = set( graphDb.createNode(), p... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_ConsistencyCheckServiceIntegrationTest.java |
4,375 | {
@Override
protected void transactionData( GraphStoreFixture.TransactionDataBuilder tx,
GraphStoreFixture.IdGenerator next )
{
tx.create( new NodeRecord( next.node(), next.relationship(), -1 ) );
}
... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_ConsistencyCheckServiceIntegrationTest.java |
4,376 | public class ConsistencyCheckServiceIntegrationTest
{
@Test
public void shouldSucceedIfStoreIsConsistent() throws Exception
{
// given
ConsistencyCheckService service = new ConsistencyCheckService();
// when
ConsistencyCheckService.Result result = service.runFullConsistencyC... | false | enterprise_consistency-check_src_test_java_org_neo4j_consistency_ConsistencyCheckServiceIntegrationTest.java |
4,377 | public class ConsistencyCheckService
{
private final Date timestamp = new Date();
public Result runFullConsistencyCheck( String storeDir,
Config tuningConfiguration,
ProgressMonitorFactory progressFactory,
... | false | enterprise_consistency-check_src_main_java_org_neo4j_consistency_ConsistencyCheckService.java |
4,378 | @SuppressWarnings( "serial" )
private static class IndexTask implements Task
{
@Override
public void run( final GraphDatabaseAPI graphdb )
{
try ( Transaction tx = graphdb.beginTx() )
{
index( graphdb.index().forNodes( "name" ), graphdb.createN... | false | community_lucene-index_src_test_java_org_neo4j_concurrencytest_ShutdownRaceIT.java |
4,379 | {
@Override
public void run()
{
runTask( graphdb );
}
}.start(); | false | community_lucene-index_src_test_java_org_neo4j_concurrencytest_ShutdownRaceIT.java |
4,380 | @SuppressWarnings( "serial" )
private static class BreakTask extends IndexTask
{
@Override
public void run( final GraphDatabaseAPI graphdb )
{
new Thread()
{
@Override
public void run()
{
runT... | false | community_lucene-index_src_test_java_org_neo4j_concurrencytest_ShutdownRaceIT.java |
4,381 | {
@Override
protected void callback( DebugInterface debug )
{
resume( shutdownThread.getAndSet( null ) );
last.countDown();
}
}.enable() }; | false | community_lucene-index_src_test_java_org_neo4j_concurrencytest_ShutdownRaceIT.java |
4,382 | {
@Override
protected void callback( DebugInterface debug )
{
indexThread.set( debug.thread().suspend( this ) );
restart.countDown();
}
}.enable(), new BreakPoint( BreakTask.class, "breakpoint2" ) | false | community_lucene-index_src_test_java_org_neo4j_concurrencytest_ShutdownRaceIT.java |
4,383 | {
@Override
protected void callback( DebugInterface debug )
{
if ( debug.matchCallingMethod( 1, LuceneDataSource.class, null ) )
{
shutdownThread.set( debug.thread().suspend( this ) );
resume( indexThread... | false | community_lucene-index_src_test_java_org_neo4j_concurrencytest_ShutdownRaceIT.java |
4,384 | @Ignore( "This test has to be rewritten such that it injects a TxManager.Monitor into the database," +
" and uses that to observe that the shut down will wait for the IndexWriter to be closed. " +
"We should also add test cases for the new schema indexes and constraint indexes." )
public class Shutdow... | false | community_lucene-index_src_test_java_org_neo4j_concurrencytest_ShutdownRaceIT.java |
4,385 | public class ToNetworkStoreWriter implements StoreWriter
{
private final ChannelBuffer targetBuffer;
private final ByteCounterMonitor bufferMonitor;
public ToNetworkStoreWriter( ChannelBuffer targetBuffer, Monitors monitors )
{
this.targetBuffer = targetBuffer;
bufferMonitor = monitors.... | false | enterprise_com_src_main_java_org_neo4j_com_storecopy_ToNetworkStoreWriter.java |
4,386 | public class ToFileStoreWriter implements StoreWriter
{
private final File basePath;
public ToFileStoreWriter( File graphDbStoreDir )
{
this.basePath = graphDbStoreDir;
}
@Override
public int write( String path, ReadableByteChannel data, ByteBuffer temporaryBuffer,
boolean ... | false | enterprise_com_src_main_java_org_neo4j_com_storecopy_ToFileStoreWriter.java |
4,387 | {
@Override
public LogBuffer createActiveLogFile( Config config, long prevCommittedId ) throws IllegalStateException, IOException
{
FileChannel channel = FileChannel.open( logWriterTarget.toPath(), CREATE, READ, WRITE );
... | false | enterprise_com_src_test_java_org_neo4j_com_storecopy_ThirdPartyDSStoreCopyIT.java |
4,388 | return new LogExtractor( logPositionCache, logLoader, null, startTxId, endTxIdHint ){
long txCounter = 1338l;
@Override
public long extractNext( LogBuffer target ) throws IOException
{
if(txCounter <= 1339)
... | false | enterprise_com_src_test_java_org_neo4j_com_storecopy_ThirdPartyDSStoreCopyIT.java |
4,389 | {
@Override
public Response<Void> fetchDataStream( MadeUpWriter writer, int dataSize )
{
writer.write( new FailingByteChannel( dataSize, failureMessage ) );
return new Response<Void>( null, storeIdToUse,
TransactionStrea... | false | enterprise_com_src_test_java_org_neo4j_com_TestCommunication.java |
4,390 | public class TestCommunication
{
private static final byte INTERNAL_PROTOCOL_VERSION = 0;
private static final byte APPLICATION_PROTOCOL_VERSION = 0;
private static final int PORT = 1234;
private StoreId storeIdToUse;
private LifeSupport life = new LifeSupport();
private Builder builder;
@... | false | enterprise_com_src_test_java_org_neo4j_com_TestCommunication.java |
4,391 | class StartupData implements Serializable
{
private static final long serialVersionUID = 1L;
final long creationTime;
final long storeId;
final long storeVersion;
final byte applicationProtocolVersion;
final byte internalProtocolVersion;
final int chunkSize;
public StartupData( long cre... | false | enterprise_com_src_test_java_org_neo4j_com_StartupData.java |
4,392 | return new AbstractStoreChannel() {
@Override
public void close() throws IOException
{
}
}; | false | enterprise_com_src_test_java_org_neo4j_com_ServerUtilTest.java |
4,393 | private static class Something
{
private boolean closed;
public void doStuff() throws Exception
{
if ( closed )
{
throw new Exception( "Closed" );
}
}
public void close()
{
this.closed = true;
... | false | enterprise_com_src_test_java_org_neo4j_com_ResourcePoolTest.java |
4,394 | private class ResourceHolder implements Runnable
{
private final Semaphore latch = new Semaphore( 0 );
private final CountDownLatch released = new CountDownLatch( 1 );
private final CountDownLatch onAcquire;
private final ResourcePool pool;
private final AtomicBoolean rel... | false | enterprise_com_src_test_java_org_neo4j_com_ResourcePoolTest.java |
4,395 | {
@Override
protected Something create()
{
return new Something();
}
@Override
protected boolean isAlive( Something resource )
{
return !resource.closed;
}
}; | false | enterprise_com_src_test_java_org_neo4j_com_ResourcePoolTest.java |
4,396 | {
@Override
protected Something create()
{
return new Something();
}
@Override
protected boolean isAlive( Something resource )
{
return !resource.closed;
}
}; | false | enterprise_com_src_test_java_org_neo4j_com_ResourcePoolTest.java |
4,397 | public class ResourcePoolTest
{
@Test
public void shouldNotReuseBrokenInstances() throws Exception
{
ResourcePool<Something> pool = new ResourcePool<Something>( 5 )
{
@Override
protected Something create()
{
return new Something();
... | false | enterprise_com_src_test_java_org_neo4j_com_ResourcePoolTest.java |
4,398 | public class Adapter<R> implements Monitor<R>
{
@Override
public void updatedCurrentPeakSize( int currentPeakSize )
{
}
@Override
public void updatedTargetSize( int targetSize )
{
}
@Override
... | false | enterprise_com_src_main_java_org_neo4j_com_ResourcePool.java |
4,399 | public class TimeoutCheckStrategy implements CheckStrategy
{
private final long interval;
private long lastCheckTime;
private final Clock clock;
public TimeoutCheckStrategy( long interval, Clock clock )
{
this.interval = interv... | false | enterprise_com_src_main_java_org_neo4j_com_ResourcePool.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.