Unnamed: 0 int64 0 6.7k | func stringlengths 12 89.6k | target bool 2
classes | project stringlengths 45 151 |
|---|---|---|---|
3,900 | @SuppressWarnings( "unchecked" )
public class RandomAdversary extends AbstractAdversary
{
private static final double STANDARD_PROPABILITY_FACTOR = 1.0;
private final double mischiefRate;
private final double failureRate;
private final double errorRate;
private volatile double probabilityFactor;
... | false | community_kernel_src_test_java_org_neo4j_adversaries_RandomAdversary.java |
3,901 | public class CountingAdversary extends AbstractAdversary
{
private final AtomicInteger countDown;
private final int startingCount;
private final boolean resetCountDownOnFailure;
public CountingAdversary( int countDownTillFailure, boolean resetCountDownOnFailure )
{
this.startingCount = coun... | false | community_kernel_src_test_java_org_neo4j_adversaries_CountingAdversary.java |
3,902 | public class ClassGuardedAdversary implements Adversary
{
private final Adversary delegate;
private final Set<String> victimClasses;
private volatile boolean enabled;
public ClassGuardedAdversary( Adversary delegate, String... victimClassNames )
{
this.delegate = delegate;
victimCla... | false | community_kernel_src_test_java_org_neo4j_adversaries_ClassGuardedAdversary.java |
3,903 | {
@Override
public void run()
{
adversary.setAndResetProbabilityFactor( factor );
}
} ); | false | community_kernel_src_test_java_org_neo4j_adversaries_AdversarySignals.java |
3,904 | {
@Override
public void run()
{
adversary.setProbabilityFactor( factor );
}
} ); | false | community_kernel_src_test_java_org_neo4j_adversaries_AdversarySignals.java |
3,905 | {
@Override
public void handle( Signal sig )
{
handleSignal();
}
} ); | false | community_kernel_src_test_java_org_neo4j_adversaries_AdversarySignals.java |
3,906 | public final class AdversarySignals
{
private static AdversarySignals instance = new AdversarySignals();
private boolean installed;
private List<Runnable> installedHandlers;
private AdversarySignals()
{
installed = false;
installedHandlers = new ArrayList<Runnable>();
}
pu... | false | community_kernel_src_test_java_org_neo4j_adversaries_AdversarySignals.java |
3,907 | @SuppressWarnings( "unchecked" )
public abstract class AbstractAdversary implements Adversary
{
protected final Random rng;
public AbstractAdversary()
{
rng = new Random();
}
protected void throwOneOf( Class<? extends Throwable>... types )
{
int choice = rng.nextInt( types.leng... | false | community_kernel_src_test_java_org_neo4j_adversaries_AbstractAdversary.java |
3,908 | class BackupImpl implements TheBackupInterface
{
private final BackupMonitor backupMonitor;
public interface SPI
{
String getStoreDir();
StoreId getStoreId();
}
private final StringLogger logger;
private final SPI spi;
private final XaDataSourceManager xaDataSourceManager;
... | false | enterprise_backup_src_main_java_org_neo4j_backup_BackupImpl.java |
3,909 | {
@Override
public long getOldChannelThreshold()
{
return Client.DEFAULT_READ_RESPONSE_TIMEOUT_SECONDS * 1000;
}
@Override
public int getMaxConcurrentTransactions()
{
return 3;
}
... | false | enterprise_backup_src_main_java_org_neo4j_backup_BackupServer.java |
3,910 | {
@Override
public Long getValue()
{
return 42L;
}
@Override
public Class<Long> getType()
{
return Long.class;
}
} ); | false | community_server_src_test_java_org_dummy_web_service_DummyPluginInitializer.java |
3,911 | class BackupService
{
class BackupOutcome
{
private final Map<String, Long> lastCommittedTxs;
private final boolean consistent;
BackupOutcome( Map<String, Long> lastCommittedTxs, boolean consistent )
{
this.lastCommittedTxs = lastCommittedTxs;
this.consis... | false | enterprise_backup_src_main_java_org_neo4j_backup_BackupService.java |
3,912 | @Service.Implementation(KernelExtensionFactory.class)
public class OnlineBackupExtensionFactory extends KernelExtensionFactory<OnlineBackupExtensionFactory.Dependencies>
{
static final String KEY = "online backup";
public interface Dependencies
{
Config getConfig();
XaDataSourceManager xaD... | false | enterprise_backup_src_main_java_org_neo4j_backup_OnlineBackupExtensionFactory.java |
3,913 | public class OnlineBackup
{
private final String hostNameOrIp;
private final int port;
private BackupService.BackupOutcome outcome;
/**
* Factory method for this class. The OnlineBackup instance returned will perform backup operations against the
* hostname and port passed in as parameters.
... | false | enterprise_backup_src_main_java_org_neo4j_backup_OnlineBackup.java |
3,914 | public class LogicalLogSeeder
{
public void ensureAtLeastOneLogicalLogPresent( String sourceHostNameOrIp, int sourcePort, GraphDatabaseAPI targetDb )
{
// Then go over all datasources, try to extract the latest tx
Set<String> noTxPresent = new HashSet<>();
XaDataSourceManager dsManager =... | false | enterprise_backup_src_main_java_org_neo4j_backup_LogicalLogSeeder.java |
3,915 | public class IncrementalBackupTests
{
private File serverPath;
private File backupPath;
@Rule
public TestName testName = new TestName();
@Before
public void before() throws Exception
{
File base = TargetDirectory.forTest( getClass() ).cleanDirectory( testName.getMethodName() );
... | false | enterprise_backup_src_test_java_org_neo4j_backup_IncrementalBackupTests.java |
3,916 | public class IncrementalBackupNotPossibleException extends RuntimeException
{
public IncrementalBackupNotPossibleException( String msg, Exception cause )
{
super(msg, cause);
}
} | false | enterprise_backup_src_main_java_org_neo4j_backup_IncrementalBackupNotPossibleException.java |
3,917 | @RunWith(PowerMockRunner.class)
@PrepareForTest(BackupTool.ToolFailureException.class)
public class ExitCodeTest {
@Test
public void shouldToolFailureExceptionCauseExitCode() {
// setup
PowerMockito.mockStatic(System.class);
// when
new BackupTool.ToolFailureException("tool fa... | false | enterprise_backup_src_test_java_org_neo4j_backup_ExitCodeTest.java |
3,918 | public class EmbeddedServer implements ServerInterface
{
private GraphDatabaseService db;
public EmbeddedServer( String storeDir, String serverAddress )
{
GraphDatabaseBuilder graphDatabaseBuilder = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder( storeDir );
graphDatabaseBuilder.setC... | false | enterprise_backup_src_test_java_org_neo4j_backup_EmbeddedServer.java |
3,919 | public class BackupToolTest
{
@Test
public void shouldUseIncrementalOrFallbackToFull() throws Exception
{
String[] args = new String[]{"-from", "single://localhost", "-to", "my_backup"};
BackupService service = mock( BackupService.class );
PrintStream systemOut = mock( PrintStream.cl... | false | enterprise_backup_src_test_java_org_neo4j_backup_BackupToolTest.java |
3,920 | static class ToolFailureException extends Exception
{
ToolFailureException( String message )
{
super( message );
}
ToolFailureException( String message, Throwable cause )
{
super( message, cause );
}
void haltJVM()
{
... | false | enterprise_backup_src_main_java_org_neo4j_backup_BackupTool.java |
3,921 | public class BackupTool
{
private static final String TO = "to";
private static final String FROM = "from";
private static final String VERIFY = "verify";
private static final String CONFIG = "config";
public static final String DEFAULT_SCHEME = "single";
static final String MISMATCHED_STORE_ID... | false | enterprise_backup_src_main_java_org_neo4j_backup_BackupTool.java |
3,922 | {
@Override
public boolean matches( Object o )
{
File[] files = (File[]) o;
if ( files == null )
{
return false;
}
for ( File file : files )
{
... | false | enterprise_backup_src_test_java_org_neo4j_backup_BackupServiceIT.java |
3,923 | {
@Override
public void run()
{
try
{
firstStoreFinishedStreaming.await();
Transaction tx = db.beginTx();
try
{
Node node1 = db.createNode(... | false | enterprise_backup_src_test_java_org_neo4j_backup_BackupServiceIT.java |
3,924 | {
@Override
public void startCopyingFiles()
{
}
@Override
public void finishedCopyingStoreFiles()
{
}
@Override
public void finishedRotatingLogicalLogs()
{
}
... | false | enterprise_backup_src_test_java_org_neo4j_backup_BackupServiceIT.java |
3,925 | public class BackupServiceIT
{
private static final TargetDirectory target = TargetDirectory.forTest( BackupServiceIT.class );
private static final String NODE_STORE = "neostore.nodestore.db";
private static final String RELATIONSHIP_STORE = "neostore.relationshipstore.db";
@Rule
public TargetDirect... | false | enterprise_backup_src_test_java_org_neo4j_backup_BackupServiceIT.java |
3,926 | private static class ProgressTxHandler implements TxHandler
{
private final ProgressListener progress = ProgressMonitorFactory.textual( System.out ).openEnded( "Transactions applied", 1000 );
@Override
public void accept( Triplet<String, Long, TxExtractor> tx, XaDataSource dataSource )
... | false | enterprise_backup_src_main_java_org_neo4j_backup_BackupService.java |
3,927 | class BackupOutcome
{
private final Map<String, Long> lastCommittedTxs;
private final boolean consistent;
BackupOutcome( Map<String, Long> lastCommittedTxs, boolean consistent )
{
this.lastCommittedTxs = lastCommittedTxs;
this.consistent = consistent;
... | false | enterprise_backup_src_main_java_org_neo4j_backup_BackupService.java |
3,928 | {
@Override
public boolean accept( File dir, String name )
{
/*
* Contains ensures that previously timestamped files are
* picked up as well
*/
return name.equals( StringLogger.DEFAULT_NAME )... | false | enterprise_backup_src_main_java_org_neo4j_backup_BackupService.java |
3,929 | {
@Override
public void configure( Map<String, String> config )
{
config.put( GraphDatabaseSettings.keep_logical_logs.name(), Settings.TRUE );
}
}; | false | enterprise_backup_src_main_java_org_neo4j_backup_BackupService.java |
3,930 | {
private BackupClient client;
@Override
public Response<?> copyStore( StoreWriter writer )
{
client = new BackupClient( sourceHostNameOrIp, sourcePort, new DevNullLoggingService(),
new Monitors()... | false | enterprise_backup_src_main_java_org_neo4j_backup_BackupService.java |
3,931 | @Path( "/" )
public class DummyThirdPartyWebService
{
public static final String DUMMY_WEB_SERVICE_MOUNT_POINT = "/dummy";
@GET
@Produces( MediaType.TEXT_PLAIN )
public Response sayHello()
{
return Response.ok()
.entity( "hello" )
.build();
}
@GET
... | false | community_server_src_test_java_org_dummy_web_service_DummyThirdPartyWebService.java |
3,932 | public class DummyPluginInitializer implements PluginLifecycle
{
public DummyPluginInitializer()
{
}
@Override
public Collection<Injectable<?>> start( GraphDatabaseService graphDatabaseService, Configuration config )
{
return Collections.<Injectable<?>>singleton( new Injectable<Long>()
... | false | community_server_src_test_java_org_dummy_web_service_DummyPluginInitializer.java |
3,933 | {
@Override
public boolean process( Message<? extends MessageType> message )
{
received.set( true );
sem.release();
return true;
}
} ); | false | enterprise_cluster_src_test_java_org_neo4j_cluster_com_message_NetworkSenderReceiverTest.java |
3,934 | {
@Override
protected Node underlyingObjectToObject( PatternMatch match )
{
return match.getNodeFor( requested );
}
}; | false | community_graph-matching_src_test_java_examples_TestSiteIndexExamples.java |
3,935 | public class RelatedNodesQuestionTest
{
@Test
public void question5346011()
{
GraphDatabaseService service = new TestGraphDatabaseFactory().newImpermanentDatabase();
try ( Transaction tx = service.beginTx() )
{
RelationshipIndex index = service.index().forRelationships( "... | false | community_lucene-index_src_test_java_examples_RelatedNodesQuestionTest.java |
3,936 | public class LuceneIndexSiteExamples
{
private static GraphDatabaseService graphDb;
private Transaction tx;
@BeforeClass
public static void setUpDb()
{
graphDb = new TestGraphDatabaseFactory().newImpermanentDatabase();
}
@Before
public void beginTx()
{
tx = ... | false | community_lucene-index_src_test_java_examples_LuceneIndexSiteExamples.java |
3,937 | {
@Override
public void write( int b ) throws IOException
{ // silent
}
} ); | false | community_lucene-index_src_test_java_examples_ImdbDocTest.java |
3,938 | private static class System
{
static PrintStream out = new PrintStream( new OutputStream()
{
@Override
public void write( int b ) throws IOException
{ // silent
}
} );
} | false | community_lucene-index_src_test_java_examples_ImdbDocTest.java |
3,939 | {
{
add( "The Matrix" );
add( "Malèna" );
add( "The Matrix Reloaded" );
}
}; | false | community_lucene-index_src_test_java_examples_ImdbDocTest.java |
3,940 | {
{
add( "The Matrix" );
}
}; | false | community_lucene-index_src_test_java_examples_ImdbDocTest.java |
3,941 | {
{
add( "Monica Bellucci" );
add( "Keanu Reeves" );
}
}; | false | community_lucene-index_src_test_java_examples_ImdbDocTest.java |
3,942 | {
{
add( "Keanu Reeves" );
add( "Keanu Reeves" );
}
}; | false | community_lucene-index_src_test_java_examples_ImdbDocTest.java |
3,943 | public class ImdbDocTest
{
private static GraphDatabaseService graphDb;
private Transaction tx;
/*
* Since this is a doc test, the code in here will be publically visible in e.g. a manual.
* This test desires to print something to System.out and there's no point in this test,
* when exec... | false | community_lucene-index_src_test_java_examples_ImdbDocTest.java |
3,944 | public class BatchInsertDocTest
{
@Test
public void insert()
{
// START SNIPPET: insert
BatchInserter inserter = BatchInserters.inserter( "target/batchinserter-example", fileSystem );
Label personLabel = DynamicLabel.label( "Person" );
inserter.createDeferredSchemaIndex( pers... | false | community_kernel_src_test_java_examples_BatchInsertDocTest.java |
3,945 | public class AutoIndexerExampleTests implements GraphHolder
{
private static final TargetDirectory target = TargetDirectory.forTest( AutoIndexerExampleTests.class );
private static GraphDatabaseService graphdb;
public @Rule
TestData<Map<String, Node>> data = TestData.producedThrough( GraphDescription.c... | false | community_lucene-index_src_test_java_examples_AutoIndexerExampleTests.java |
3,946 | MATRIX_EXAMPLE
{
public Node create( GraphDatabaseService graphdb )
{
Node neo = graphdb.createNode();
neo.setProperty( "name", "Thomas Anderson" );
neo.setProperty( "age", 29 );
Node trinity = graphdb.createNode();
trinity.setPropert... | false | community_graph-algo_src_test_java_common_StandardGraphs.java |
3,947 | SMALL_CIRCLE
{
public Node create( GraphDatabaseService graphdb )
{
Node start = graphdb.createNode(), end = graphdb.createNode();
start.createRelationshipTo( end, this );
end.createRelationshipTo( start, this );
return end;
}
}, | false | community_graph-algo_src_test_java_common_StandardGraphs.java |
3,948 | CROSS_PATHS_GRAPH
{
public Node create( GraphDatabaseService graphdb )
{
Node start = graphdb.createNode(), end = graphdb.createNode();
Node a = graphdb.createNode(), b = graphdb.createNode(), c = graphdb.createNode(), d = graphdb.createNode();
start.createRel... | false | community_graph-algo_src_test_java_common_StandardGraphs.java |
3,949 | public class SimpleGraphBuilder
{
public static final String KEY_ID = "name";
GraphDatabaseService graphDb;
HashMap<String,Node> nodes;
HashMap<Node,String> nodeNames;
Set<Relationship> edges;
RelationshipType currentRelType = null;
public SimpleGraphBuilder( GraphDatabaseService graph... | false | community_graph-algo_src_test_java_common_SimpleGraphBuilder.java |
3,950 | public abstract class Neo4jAlgoTestCase
{
protected static GraphDatabaseService graphDb;
protected static SimpleGraphBuilder graph = null;
protected Transaction tx;
public static enum MyRelTypes implements RelationshipType
{
R1, R2, R3
}
@BeforeClass
public static void setUpGra... | false | community_graph-algo_src_test_java_common_Neo4jAlgoTestCase.java |
3,951 | private static class RelationshipDescription
{
private final String end;
private final String start;
private final RelationshipType type;
public RelationshipDescription( String rel )
{
String[] parts = rel.split( " " );
if ( parts.length != 3 )
... | false | community_graph-algo_src_test_java_common_GraphDescription.java |
3,952 | public class GraphDescription implements GraphDefinition
{
private static class RelationshipDescription
{
private final String end;
private final String start;
private final RelationshipType type;
public RelationshipDescription( String rel )
{
String[] parts... | false | community_graph-algo_src_test_java_common_GraphDescription.java |
3,953 | public class CsvFileReader extends PrefetchingIterator<String[]>
{
private final BufferedReader reader;
private String delimiter;
public CsvFileReader( File file ) throws IOException
{
this( file, null );
}
public CsvFileReader( File file, String delimiter ) throws IOException
... | false | community_graph-algo_src_test_java_common_CsvFileReader.java |
3,954 | public class TestSiteIndexExamples
{
@ClassRule
public static EmbeddedDatabaseRule graphDb = new EmbeddedDatabaseRule();
// START SNIPPET: findNodesWithRelationshipsTo
public static Iterable<Node> findNodesWithRelationshipsTo(
RelationshipType type, Node... nodes )
{
if ( nodes ... | false | community_graph-matching_src_test_java_examples_TestSiteIndexExamples.java |
3,955 | {
long now = new Date().getTime();
@Override
public boolean matches( Object value )
{
if ( value instanceof Long )
{
long ageInDays = ( now - (Long) value )
/ MILLSECONDS_PER... | false | community_graph-matching_src_test_java_examples_TestSiteIndexExamples.java |
3,956 | public class RebuildSegmentInfo
{
public static void main( String[] args ) throws Exception
{
if(args.length != 1)
{
System.out.println("Usage: RebuildSegmentInfo <INDEX DIRECTORY>");
System.exit( 0 );
}
String path = args[0];
File file = new File(... | false | community_lucene-index_src_main_java_org_apache_lucene_index_RebuildSegmentInfo.java |
3,957 | {
@Override
protected Node underlyingObjectToObject( PatternMatch match )
{
return match.getNodeFor( friend );
}
}; | false | community_graph-matching_src_test_java_examples_TestSiteIndexExamples.java |
3,958 | public class RebuildCompoundFile
{
public static void main( String[] args ) throws Exception
{
if(args.length != 1)
{
System.out.println("Usage: RebuildCompoundFile <INDEX DIRECTORY>");
System.exit( 0 );
}
String path = args[0];
File baseDirectory ... | false | community_lucene-index_src_main_java_org_apache_lucene_index_RebuildCompoundFile.java |
3,959 | public class IndexWriterAccessor
{
public static boolean isClosed(IndexWriter writer)
{
return writer.isClosed();
}
} | false | community_lucene-index_src_test_java_org_apache_lucene_index_IndexWriterAccessor.java |
3,960 | public class TestPatternMatching implements GraphHolder
{
@Override
public GraphDatabaseService graphdb()
{
return graphDb;
}
public @Rule
TestData<Map<String, Node>> data = TestData.producedThrough( GraphDescription.createGraphFor( this, true ) );
private static GraphDatabaseServi... | false | community_graph-matching_src_test_java_matching_TestPatternMatching.java |
3,961 | {
@Override
protected Node underlyingObjectToObject( PatternMatch match )
{
return match.getNodeFor( message );
}
}; | false | community_graph-matching_src_test_java_matching_TestMatchingOfCircularPattern.java |
3,962 | private static class VisibleMessagesByFollowedUsers implements
Iterable<Node>
{
private final PatternNode start = new PatternNode();
private final PatternNode message = new PatternNode();
private final Node startNode;
public VisibleMessagesByFollowedUsers( Node star... | false | community_graph-matching_src_test_java_matching_TestMatchingOfCircularPattern.java |
3,963 | {
@Override
public boolean isStopNode( TraversalPosition currentPos )
{
return currentPos.depth() >= depth;
}
}; | false | community_graph-matching_src_test_java_matching_TestMatchingOfCircularPattern.java |
3,964 | {
@Override
public boolean isReturnableNode( TraversalPosition pos )
{
Node node = pos.currentNode();
return isMessage( node )
&& isVisibleTo( node, startNode );
... | false | community_graph-matching_src_test_java_matching_TestMatchingOfCircularPattern.java |
3,965 | public class TestMatchingOfCircularPattern
{
static private final boolean STATIC_PATTERN = false;
private static class VisibleMessagesByFollowedUsers implements
Iterable<Node>
{
private final PatternNode start = new PatternNode();
private final PatternNode message = new PatternN... | false | community_graph-matching_src_test_java_matching_TestMatchingOfCircularPattern.java |
3,966 | {
{
put( "java.lang.String", "String" );
put( "java.util.List", "List (java.util.List)" );
put( "java.util.Date", "Date (java.util.Date)" );
}
}; | false | enterprise_ha_src_test_java_jmx_JmxDocTest.java |
3,967 | {
{
add( "JMX Server" );
}
}; | false | enterprise_ha_src_test_java_jmx_JmxDocTest.java |
3,968 | public class JmxDocTest
{
private static final String IFDEF_HTMLOUTPUT = "ifndef::nonhtmloutput[]\n";
private static final String IFDEF_NONHTMLOUTPUT = "ifdef::nonhtmloutput[]\n";
private static final String ENDIF = "endif::nonhtmloutput[]\n";
private static final String BEAN_NAME0 = "name0";
privat... | false | enterprise_ha_src_test_java_jmx_JmxDocTest.java |
3,969 | {
@Override
public boolean accept( ClusterMemberInfo item )
{
return item.isAlive() == alive;
}
}; | false | enterprise_ha_src_test_java_jmx_HaBeanIT.java |
3,970 | {
@Override
public boolean accept( ClusterMemberInfo item )
{
return item.isAvailable() == available;
}
}; | false | enterprise_ha_src_test_java_jmx_HaBeanIT.java |
3,971 | {
@Override
public URI apply( String from )
{
return URI.create( from );
}
}, Arrays.asList( slave.getUris() ) ) ).getPort() ); | false | enterprise_ha_src_test_java_jmx_HaBeanIT.java |
3,972 | {
@Override
public URI apply( String from )
{
return URI.create( from );
}
}, Arrays.asList( master.getUris() ) ) ).getPort() ); | false | enterprise_ha_src_test_java_jmx_HaBeanIT.java |
3,973 | {
@Override
protected void config( GraphDatabaseBuilder builder, String clusterName, int serverId )
{
builder.setConfig( "jmx.port", "" + ( 9912 + serverId ) );
builder.setConfig( HaSettings.ha_server, ":" + ( 1136 + serverId ) );
... | false | enterprise_ha_src_test_java_jmx_HaBeanIT.java |
3,974 | public class HaBeanIT
{
@Rule
public final TestName testName = new TestName();
private static final TargetDirectory dir = TargetDirectory.forTest( HaBeanIT.class );
private ManagedCluster cluster;
private ClusterManager clusterManager;
public void startCluster( int size ) throws Throwable
... | false | enterprise_ha_src_test_java_jmx_HaBeanIT.java |
3,975 | {
@Override
public Node create( GraphDatabaseService graphdb )
{
Node me = graphdb.createNode();
Node stockholm = graphdb.createNode(), gothenburg = graphdb.createNode();
stockholm.setProperty( "name", "Stockholm" );
... | false | community_graph-matching_src_test_java_examples_TestSiteIndexExamples.java |
3,976 | {
@Override
public Node[] create( GraphDatabaseService graphdb )
{
Node[] nodes = new Node[5];
for ( int i = 0; i < nodes.length; i++ )
{
nodes[i] = graphdb.createNode();
}
for... | false | community_graph-matching_src_test_java_examples_TestSiteIndexExamples.java |
3,977 | public class OnlineBackupKernelExtension implements Lifecycle
{
public interface BackupProvider
{
TheBackupInterface newBackup();
}
// This is the role used to announce that a cluster member can handle backups
public static final String BACKUP = "backup";
// In this context, the IPv4 ze... | false | enterprise_backup_src_main_java_org_neo4j_backup_OnlineBackupKernelExtension.java |
3,978 | {
@Override
public TheBackupInterface newBackup()
{
return new BackupImpl( logging.getMessagesLog( BackupImpl.class ), new BackupImpl.SPI()
{
@Override
public String getStoreDir()
{
... | false | enterprise_backup_src_main_java_org_neo4j_backup_OnlineBackupKernelExtension.java |
3,979 | {
@Override
public String getStoreDir()
{
return graphDatabaseAPI.getStoreDir();
}
@Override
public StoreId getStoreId()
{
... | false | enterprise_backup_src_main_java_org_neo4j_backup_OnlineBackupKernelExtension.java |
3,980 | public class Clusters
{
private final List<Cluster> clusters = new ArrayList<Cluster>();
private long timestamp;
public void setTimestamp( long timestamp )
{
this.timestamp = timestamp;
}
public long getTimestamp()
{
return timestamp;
}
public List<Cluster> getClus... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_client_Clusters.java |
3,981 | {
@Override
public URI apply( HostnamePort member )
{
return URI.create( "cluster://" + resolvePortOnlyHost( member ) );
}
}, hosts)); | false | enterprise_cluster_src_main_java_org_neo4j_cluster_client_ClusterJoin.java |
3,982 | {
@Override
public void leftCluster()
{
cluster.removeClusterListener( this );
semaphore.release();
}
} ); | false | enterprise_cluster_src_main_java_org_neo4j_cluster_client_ClusterJoin.java |
3,983 | public class ClusterJoin
extends LifecycleAdapter
{
public interface Configuration
{
List<HostnamePort> getInitialHosts();
String getClusterName();
boolean isAllowedToCreateCluster();
long getClusterJoinTimeout();
}
private final Configuration config;
priv... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_client_ClusterJoin.java |
3,984 | {
@Override
public void run()
{
long now = System.currentTimeMillis();
server.getTimeouts().tick( now );
}
}, 0, 10, TimeUnit.MILLISECONDS ); | false | enterprise_cluster_src_main_java_org_neo4j_cluster_client_ClusterClient.java |
3,985 | public class TimeoutTrigger implements Lifecycle
{
private ScheduledExecutorService scheduler;
private ScheduledFuture<?> tickFuture;
@Override
public void init() throws Throwable
{
server.getTimeouts().tick( System.currentTimeMillis() );
}
@... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_client_ClusterClient.java |
3,986 | {
@Override
public List<HostnamePort> getInitialHosts()
{
return config.getInitialHosts();
}
@Override
public String getClusterName()
{
return config.getClusterName();
}
... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_client_ClusterClient.java |
3,987 | {
@Override
public ExecutorService newInstance()
{
return Executors.newSingleThreadExecutor( new NamedThreadFactory( "State machine" ) );
}
} ); | false | enterprise_cluster_src_main_java_org_neo4j_cluster_client_ClusterClient.java |
3,988 | {
@Override
public HostnamePort clusterServer()
{
return config.getAddress();
}
@Override
public int defaultPort()
{
return 5001;
}
@Override
public String na... | false | enterprise_cluster_src_main_java_org_neo4j_cluster_client_ClusterClient.java |
3,989 | public class VerifyInstanceConfiguration
{
public final List<URI> members;
public final Map<String, InstanceId> roles;
public final Set<InstanceId> failed;
public VerifyInstanceConfiguration( List<URI> members, Map<String, InstanceId> roles, Set<InstanceId> failed )
{
this.members = members... | false | enterprise_cluster_src_test_java_org_neo4j_cluster_VerifyInstanceConfiguration.java |
3,990 | public class TestMessageSource
implements MessageSource, MessageProcessor
{
Iterable<MessageProcessor> listeners = Listeners.newListeners();
@Override
public void addMessageProcessor( MessageProcessor listener )
{
listeners = Listeners.addListener( listen... | false | enterprise_cluster_src_test_java_org_neo4j_cluster_TestProtocolServer.java |
3,991 | public class TestMessageSender implements MessageSender
{
List<Message> messages = new ArrayList<Message>();
@Override
public void process( List<Message<? extends MessageType>> messages )
{
for ( Message<? extends MessageType> message : messages )
{
... | false | enterprise_cluster_src_test_java_org_neo4j_cluster_TestProtocolServer.java |
3,992 | public class TestProtocolServer
implements MessageProcessor
{
protected final TestMessageSource receiver;
protected final TestMessageSender sender;
protected ProtocolServer server;
private final DelayedDirectExecutor stateMachineExecutor;
private URI serverUri;
public TestProtocolServe... | false | enterprise_cluster_src_test_java_org_neo4j_cluster_TestProtocolServer.java |
3,993 | private class ExpectingStateTransitionListener implements StateTransitionListener
{
private final Deque<String> transitionHistory = new LinkedList<String>();
private final Deque<ExpectedTransition> transitions;
private volatile boolean valid = true;
private final Object id;
... | false | enterprise_cluster_src_test_java_org_neo4j_cluster_StateTransitionExpectations.java |
3,994 | private class ExpectedTransition
{
private final MessageType messageToGetHere;
private final State state;
ExpectedTransition( MessageType messageToGetHere, State state )
{
this.messageToGetHere = messageToGetHere;
this.state = state;
}
... | false | enterprise_cluster_src_test_java_org_neo4j_cluster_StateTransitionExpectations.java |
3,995 | public class ExpectationsBuilder
{
private final Deque<ExpectedTransition> transitions = new LinkedList<ExpectedTransition>();
private boolean includeUnchanged;
public ExpectationsBuilder expect( MessageType messageToGetHere, State state )
{
transitions.add( ... | false | enterprise_cluster_src_test_java_org_neo4j_cluster_StateTransitionExpectations.java |
3,996 | {
@Override
public void stateTransition( StateTransition messagetypeStateTransition )
{
}
}; | false | enterprise_cluster_src_test_java_org_neo4j_cluster_StateTransitionExpectations.java |
3,997 | public class StateTransitionExpectations<CONTEXT,MESSAGETYPE extends Enum<MESSAGETYPE> & MessageType>
{
public final StateTransitionListener NO_EXPECTATIONS = new StateTransitionListener()
{
@Override
public void stateTransition( StateTransition messagetypeStateTransition )
{
}
... | false | enterprise_cluster_src_test_java_org_neo4j_cluster_StateTransitionExpectations.java |
3,998 | test
{
@Override
public State<?, ?> handle( List context, Message<TestMessage> message, MessageHolder outgoing ) throws Throwable
{
context.add(message.getMessageType());
switch ( message.getMessageType() )
{
... | false | enterprise_cluster_src_test_java_org_neo4j_cluster_StateMachinesTest.java |
3,999 | {
@Override
public Object answer( InvocationOnMock invocation ) throws Throwable
{
Message message = (Message) invocation.getArguments()[0];
MessageHolder holder = (MessageHolder) invocation.getArguments()[1];
message.setHeader(... | false | enterprise_cluster_src_test_java_org_neo4j_cluster_StateMachinesTest.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.