Unnamed: 0 int64 0 6.7k | func stringlengths 12 89.6k | target bool 2
classes | project stringlengths 45 151 |
|---|---|---|---|
4,700 | {
@Override
public Void doWork( Void state ) throws Exception
{
try ( IndexUpdater secondUpdater = populator.newPopulatingUpdater( propertyAccessor ) )
{ // Just open it and let it be closed
}
return null;
... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_DeferredConstraintVerificationUniqueLuceneIndexPopulatorTest.java |
4,701 | {
@Override
public Void doWork( Void state ) throws Exception
{
populator.verifyDeferredConstraints( propertyAccessor );
return null;
}
} ); | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_DeferredConstraintVerificationUniqueLuceneIndexPopulatorTest.java |
4,702 | {
@Override
public Void doWork( Void state ) throws Exception
{
try ( IndexUpdater updater = populator.newPopulatingUpdater( propertyAccessor ) )
{ // Just open it and let it be closed
}
return null;
... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_DeferredConstraintVerificationUniqueLuceneIndexPopulatorTest.java |
4,703 | public class DeferredConstraintVerificationUniqueLuceneIndexPopulatorTest
{
@Test
public void shouldVerifyThatThereAreNoDuplicates() throws Exception
{
populator.add( 1, "value1" );
populator.add( 2, "value2" );
populator.add( 3, "value3" );
// when
populator.verifyD... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_DeferredConstraintVerificationUniqueLuceneIndexPopulatorTest.java |
4,704 | private static class EntrySet
{
static final int INCREMENT = 100;
Object[] value = new Object[INCREMENT];
long[] nodeId = new long[INCREMENT];
EntrySet next;
public void reset()
{
EntrySet current = this;
do {
for (int i =... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_DeferredConstraintVerificationUniqueLuceneIndexPopulator.java |
4,705 | private static class DuplicateCheckingCollector extends Collector
{
private final PropertyAccessor accessor;
private final LuceneDocumentStructure documentStructure;
private final int propertyKeyId;
private final EntrySet actualValues;
private IndexReader reader;
... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_DeferredConstraintVerificationUniqueLuceneIndexPopulator.java |
4,706 | {
List<Object> updatedPropertyValues = new ArrayList<>();
@Override
public void process( NodePropertyUpdate update ) throws IOException, IndexEntryConflictException
{
long nodeId = update.getNodeId();
switch ( update.getUpdateMode(... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_DeferredConstraintVerificationUniqueLuceneIndexPopulator.java |
4,707 | class DeferredConstraintVerificationUniqueLuceneIndexPopulator extends LuceneIndexPopulator
{
private final IndexDescriptor descriptor;
private SearcherManager searcherManager;
DeferredConstraintVerificationUniqueLuceneIndexPopulator( LuceneDocumentStructure documentStructure,
... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_DeferredConstraintVerificationUniqueLuceneIndexPopulator.java |
4,708 | _64( BitmapFormat._64 )
{
@Override
protected NumericField setFieldValue( NumericField field, long bitmap )
{
return field.setLongValue( bitmap );
}
}; | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_BitmapDocumentFormat.java |
4,709 | public class LuceneLabelScanWriter implements LabelScanWriter
{
private final LabelScanStorageStrategy.StorageService storage;
private final BitmapDocumentFormat format;
private final IndexSearcher searcher;
private List<NodeLabelUpdate> updates;
private long currentRange;
public LuceneLabelSc... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_LuceneLabelScanWriter.java |
4,710 | public class LuceneNodeLabelRange implements NodeLabelRange
{
private final int id;
private final long[] nodeIds;
private final long[][] labelIds;
public LuceneNodeLabelRange( int id, long[] nodeIds, long[][] labelIds )
{
this.id = id;
this.labelIds = labelIds;
this.nodeIds ... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_LuceneNodeLabelRange.java |
4,711 | public class LuceneNodeLabelRangeTest
{
@Test
public void shouldTransposeNodeIdsAndLabelIds() throws Exception
{
// given
long[] labelIds = new long[]{1, 3, 5};
long[][] nodeIdsByLabelIndex = new long[][]{{0}, {2, 4}, {0, 2, 4}};
// when
LuceneNodeLabelRange range = ... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_LuceneNodeLabelRangeTest.java |
4,712 | {
@Override
public Object[] apply( TestValue testValue )
{
return new Object[]{testValue};
}
}, testValues ) ); | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_SchemaIndexProviderApprovalTest.java |
4,713 | public static class Descriptor
{
private final String key;
private final String version;
public Descriptor( String key, String version )
{
if (key == null)
{
throw new IllegalArgumentException( "null provider key prohibited" );
... | false | community_kernel_src_main_java_org_neo4j_kernel_api_index_SchemaIndexProvider.java |
4,714 | {
@Override
@SuppressWarnings("unchecked")
public <T> T select( Class<T> type, Iterable<T> candidates ) throws IllegalArgumentException
{
List<Comparable> all = (List<Comparable>) addToCollection( candidates, new ArrayList<T>() );
if ( all.isEmpty() )
... | false | community_kernel_src_main_java_org_neo4j_kernel_api_index_SchemaIndexProvider.java |
4,715 | {
private final IndexAccessor singleWriter = new IndexAccessor.Adapter();
private final IndexPopulator singlePopulator = new IndexPopulator.Adapter();
@Override
public IndexAccessor getOnlineAccessor( long indexId, IndexConfiguration config )
{
return singleWrite... | false | community_kernel_src_main_java_org_neo4j_kernel_api_index_SchemaIndexProvider.java |
4,716 | public abstract class SchemaIndexProvider extends LifecycleAdapter implements Comparable<SchemaIndexProvider>
{
public static final SchemaIndexProvider NO_INDEX_PROVIDER =
new SchemaIndexProvider( new Descriptor("no-index-provider", "1.0"), -1 )
{
private final IndexAccessor singleWriter = n... | false | community_kernel_src_main_java_org_neo4j_kernel_api_index_SchemaIndexProvider.java |
4,717 | private static class ArrayEqualityObject
{
private final Object array;
ArrayEqualityObject( Object array )
{
this.array = array;
}
@Override
public int hashCode()
{
return ArrayUtil.hashCode( array );
}
@Override
... | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_SchemaConstraintProviderApprovalTest.java |
4,718 | {
@Override
public Object apply( Node node )
{
Object value = node.getProperty( PROPERTY_KEY );
if ( value.getClass().isArray() )
{
return new ArrayEqualityObject( value );
}
return value;
}
}; | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_SchemaConstraintProviderApprovalTest.java |
4,719 | {
@Override
public Object[] apply( TestValue testValue )
{
return new Object[]{testValue};
}
}, testValues ) ); | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_SchemaConstraintProviderApprovalTest.java |
4,720 | @RunWith(value = Parameterized.class)
public abstract class SchemaConstraintProviderApprovalTest
{
/*
These are the values that will be checked. Searching
*/
public enum TestValue
{
BOOLEAN_TRUE( true ),
BOOLEAN_FALSE( false ),
STRING_TRUE( "true" ),
STRING_FALSE( "f... | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_SchemaConstraintProviderApprovalTest.java |
4,721 | public class PreexistingIndexEntryConflictExceptionTest
{
@Test
public void messageShouldIncludePropertyValueAndNodeIds() throws Exception
{
// given
PreexistingIndexEntryConflictException e = new PreexistingIndexEntryConflictException( "value1", 11, 22 );
// then
assertEqua... | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_PreexistingIndexEntryConflictExceptionTest.java |
4,722 | public class PreexistingIndexEntryConflictException extends IndexEntryConflictException
{
private final Object propertyValue;
private final long addedNodeId;
private final long existingNodeId;
public PreexistingIndexEntryConflictException( Object propertyValue, long existingNodeId, long addedNodeId )
... | false | community_kernel_src_main_java_org_neo4j_kernel_api_index_PreexistingIndexEntryConflictException.java |
4,723 | private static class Parameterization extends BlockJUnit4ClassRunner
{
private final ParameterBuilder builder;
private final Constructor<?> constructor;
Parameterization( ParameterBuilder builder, Constructor<?> constructor ) throws InitializationError
{
super( const... | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_ParameterizedSuiteRunner.java |
4,724 | private static class ParameterBuilder extends RunnerBuilder
{
private final Map<Class<?>, Parameterization> parameterizations = new HashMap<Class<?>, Parameterization>();
private final Class<?> suiteClass;
ParameterBuilder( Class<?> suiteClass ) throws InitializationError
{
... | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_ParameterizedSuiteRunner.java |
4,725 | public class ParameterizedSuiteRunner extends Suite
{
@SuppressWarnings("unused"/*used by jUnit through reflection*/)
public ParameterizedSuiteRunner( Class<?> testClass ) throws InitializationError
{
this( testClass, new ParameterBuilder( testClass ) );
}
ParameterizedSuiteRunner( Class<?>... | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_ParameterizedSuiteRunner.java |
4,726 | {
@Override
public Property getProperty( long nodeId, int propertyKeyId ) throws EntityNotFoundException, PropertyNotFoundException
{
return Property.stringProperty( propertyKeyId, propertyValue );
}
}; | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_NonUniqueIndexPopulatorCompatibility.java |
4,727 | @Ignore( "Not a test. This is a compatibility suite that provides test cases for verifying" +
" SchemaIndexProvider implementations. Each index provider that is to be tested by this suite" +
" must create their own test class extending IndexProviderCompatibilityTestSuite." +
" The @Ignore annota... | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_NonUniqueIndexPopulatorCompatibility.java |
4,728 | public class NodePropertyUpdate
{
private final long nodeId;
private final int propertyKeyId;
private final Object valueBefore;
private final Object valueAfter;
private final UpdateMode updateMode;
private final long[] labelsBefore;
private final long[] labelsAfter;
private NodeProperty... | false | community_kernel_src_main_java_org_neo4j_kernel_api_index_NodePropertyUpdate.java |
4,729 | {
@Override
public PrimitiveLongIterator lookup( Object value )
{
return emptyPrimitiveLongIterator();
}
@Override
public void close()
{
}
}; | false | community_kernel_src_main_java_org_neo4j_kernel_api_index_IndexReader.java |
4,730 | public static abstract class Compatibility
{
protected final SchemaIndexProvider indexProvider;
protected IndexDescriptor descriptor = new IndexDescriptor( 1, 2 );
public Compatibility( IndexProviderCompatibilityTestSuite testSuite )
{
this.indexProvider = testSuite.... | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_IndexProviderCompatibilityTestSuite.java |
4,731 | @RunWith(ParameterizedSuiteRunner.class)
@Suite.SuiteClasses({
NonUniqueIndexPopulatorCompatibility.class,
UniqueIndexPopulatorCompatibility.class,
UniqueIndexAccessorCompatibility.class,
UniqueConstraintCompatibility.class
})
public abstract class IndexProviderCompatibilityTestSuite
{
... | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_IndexProviderCompatibilityTestSuite.java |
4,732 | @RunWith(value = Parameterized.class)
public abstract class SchemaIndexProviderApprovalTest
{
/*
These are the values that will be checked. Searching
*/
public enum TestValue
{
BOOLEAN_TRUE( true ),
BOOLEAN_FALSE( false ),
STRING_TRUE( "true" ),
STRING_FALSE( "false"... | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_SchemaIndexProviderApprovalTest.java |
4,733 | {
@Override
public Object apply( Node node )
{
Object value = node.getProperty( PROPERTY_KEY );
if ( value.getClass().isArray() )
{
return new ArrayEqualityObject( value );
}
return value;
}
}; | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_SchemaIndexProviderApprovalTest.java |
4,734 | public class LuceneSchemaIndexCorruptionTest
{
@Test
public void shouldMarkIndexAsFailedIfIndexIsCorrupt() throws Exception
{
// Given
DirectoryFactory dirFactory = mock(DirectoryFactory.class);
// This isn't quite correct, but it will trigger the correct code paths in our code
... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_LuceneSchemaIndexCorruptionTest.java |
4,735 | private static class ArrayEqualityObject
{
private final Object array;
ArrayEqualityObject( Object array )
{
this.array = array;
}
@Override
public int hashCode()
{
return ArrayUtil.hashCode( array );
}
@Override
... | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_SchemaIndexProviderApprovalTest.java |
4,736 | public class NodeLabelUpdateNodeIdComparator implements Comparator<NodeLabelUpdate>
{
@Override public int compare( NodeLabelUpdate o1, NodeLabelUpdate o2 )
{
long nodeId1 = o1.getNodeId();
long nodeId2 = o2.getNodeId();
if ( nodeId1 > nodeId2 )
{
return 1;
}... | false | community_kernel_src_main_java_org_neo4j_kernel_api_labelscan_NodeLabelUpdateNodeIdComparator.java |
4,737 | public class NodeLabelUpdate
{
private final long nodeId;
private final long[] labelsBefore;
private final long[] labelsAfter;
private NodeLabelUpdate( long nodeId, long[] labelsBefore, long[] labelsAfter )
{
this.nodeId = nodeId;
this.labelsBefore = labelsBefore;
this.label... | false | community_kernel_src_main_java_org_neo4j_kernel_api_labelscan_NodeLabelUpdate.java |
4,738 | {
@Override
public PrimitiveLongIterator nodesWithLabel( int labelId )
{
return emptyPrimitiveLongIterator();
}
@Override
public Iterator<Long> labelsForNode( long nodeId )
{
return emptyIterator();
}
@Override
... | false | community_kernel_src_main_java_org_neo4j_kernel_api_labelscan_LabelScanReader.java |
4,739 | public class FolderLayout
{
private final File rootDirectory;
public FolderLayout( File rootDirectory )
{
this.rootDirectory = rootDirectory;
}
public File getFolder( long indexId )
{
return new File( rootDirectory, "" + indexId );
}
} | false | community_kernel_src_main_java_org_neo4j_kernel_api_index_util_FolderLayout.java |
4,740 | public class FailureStorage
{
public static final int MAX_FAILURE_SIZE = 16384;
public static final String DEFAULT_FAILURE_FILE_NAME = "failure-message";
private final FolderLayout folderLayout;
private final String failureFileName;
/**
* @param failureFileName name of failure files to be cre... | false | community_kernel_src_main_java_org_neo4j_kernel_api_index_util_FailureStorage.java |
4,741 | @Ignore( "Not a test. This is a compatibility suite that provides test cases for verifying" +
" SchemaIndexProvider implementations. Each index provider that is to be tested by this suite" +
" must create their own test class extending IndexProviderCompatibilityTestSuite." +
" The @Ignore annota... | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_UniqueIndexPopulatorCompatibility.java |
4,742 | @Ignore( "Not a test. This is a compatibility suite that provides test cases for verifying" +
" SchemaIndexProvider implementations. Each index provider that is to be tested by this suite" +
" must create their own test class extending IndexProviderCompatibilityTestSuite." +
" The @Ignore annota... | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_UniqueIndexAccessorCompatibility.java |
4,743 | private static class PredefinedSchemaIndexProviderFactory extends KernelExtensionFactory<PredefinedSchemaIndexProviderFactory.NoDeps>
{
private final SchemaIndexProvider indexProvider;
@Override
public Lifecycle newKernelExtension( NoDeps noDeps ) throws Throwable
{
... | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_UniqueConstraintCompatibility.java |
4,744 | private abstract class Action implements Function<Transaction,Void>
{
private final String name;
protected Action( String name )
{
this.name = name;
}
@Override
public String toString()
{
return name;
}
} | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_UniqueConstraintCompatibility.java |
4,745 | {
@Override
public Void apply( Transaction transaction )
{
assertThat( lookUpNode( propertyValue ), matcher );
return null;
}
}; | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_UniqueConstraintCompatibility.java |
4,746 | {
@Override
public Void apply( Transaction transaction )
{
Assert.fail( message );
return null;
}
}; | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_UniqueConstraintCompatibility.java |
4,747 | {
@Override
public Void apply( Transaction transaction )
{
node.addLabel( label );
return null;
}
}; | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_UniqueConstraintCompatibility.java |
4,748 | {
@Override
public Void apply( Transaction transaction )
{
node.removeProperty( property );
return null;
}
}; | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_UniqueConstraintCompatibility.java |
4,749 | {
@Override
public Void apply( Transaction transaction )
{
node.setProperty( property, value );
return null;
}
}; | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_UniqueConstraintCompatibility.java |
4,750 | {
@Override
public Void apply( Transaction transaction )
{
Node node = db.createNode( label );
node.setProperty( property, propertyValue );
return null;
}
}; | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_UniqueConstraintCompatibility.java |
4,751 | {
@Override
public Void apply( Transaction transaction )
{
transaction.success();
// We also call close() here, because some validations and checks don't run until commit
transaction.close();
return null;
}
}; | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_UniqueConstraintCompatibility.java |
4,752 | {
@Override
public void run()
{
createUniqueConstraint( createConstraintTransactionStarted );
}
} ); | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_UniqueConstraintCompatibility.java |
4,753 | {
@Override
public void run()
{
try ( Transaction tx = db.beginTx() )
{
for ( Action action : actions )
{
action.apply( tx );
}
tx.success()... | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_UniqueConstraintCompatibility.java |
4,754 | @Ignore( "Not a test. This is a compatibility suite that provides test cases for verifying" +
" SchemaIndexProvider implementations. Each index provider that is to be tested by this suite" +
" must create their own test class extending IndexProviderCompatibilityTestSuite." +
" The @Ignore annota... | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_UniqueConstraintCompatibility.java |
4,755 | class Adapter implements IndexPopulator
{
@Override
public void create() throws IOException
{
}
@Override
public void drop() throws IOException
{
}
@Override
public void add( long nodeId, Object propertyValue ) throws IndexEntryCo... | false | community_kernel_src_main_java_org_neo4j_kernel_api_index_IndexPopulator.java |
4,756 | public abstract class IndexEntryConflictException extends Exception
{
public IndexEntryConflictException( String message )
{
super( message );
}
protected static String quote( Object propertyValue )
{
if ( propertyValue instanceof String )
{
return format( "'%s'"... | false | community_kernel_src_main_java_org_neo4j_kernel_api_index_IndexEntryConflictException.java |
4,757 | public class IndexDescriptor
{
private final int labelId;
private final int propertyKeyId;
public IndexDescriptor( int labelId, int propertyKeyId )
{
this.labelId = labelId;
this.propertyKeyId = propertyKeyId;
}
@Override
public boolean equals( Object obj )
{
if... | false | community_kernel_src_main_java_org_neo4j_kernel_api_index_IndexDescriptor.java |
4,758 | public class IndexConfiguration
{
private final boolean unique;
public IndexConfiguration( boolean unique )
{
this.unique = unique;
}
public boolean isUnique()
{
return unique;
}
@Override
public boolean equals( Object o )
{
return this == o ||
... | false | community_kernel_src_main_java_org_neo4j_kernel_api_index_IndexConfiguration.java |
4,759 | {
@Override
protected boolean matchesSafely( List<?> item )
{
return item.size() == size;
}
@Override
public void describeTo( Description description )
{
description.appendText( "List with size="... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_UniqueIndexApplicationIT.java |
4,760 | @RunWith(Parameterized.class)
public class UniqueIndexApplicationIT
{
public final @Rule DatabaseRule db = new ImpermanentDatabaseRule();
@Parameterized.Parameters(name = "{0}")
public static List<Object[]> indexTypes()
{
return asList( createIndex( index( label( "Label1" ), "key1" ) ),
... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_UniqueIndexApplicationIT.java |
4,761 | public class SchemaIndexAcceptanceTest
{
@Test
public void creatingIndexOnExistingDataBuildsIndexWhichWillBeOnlineNextStartup() throws Exception
{
Transaction tx = db.beginTx();
Node node1 = createNode( label, "name", "One" );
Node node2 = createNode( label, "name", "Two" );
... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_SchemaIndexAcceptanceTest.java |
4,762 | @RunWith(Parameterized.class)
public class PageOfRangesIteratorTest
{
@Parameterized.Parameters(name = "{0} bits")
public static List<Object[]> formats()
{
ArrayList<Object[]> parameters = new ArrayList<>();
for ( BitmapDocumentFormat format : BitmapDocumentFormat.values() )
{
... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_PageOfRangesIteratorTest.java |
4,763 | class PageOfRangesIterator extends PrefetchingIterator<PrimitiveLongIterator>
{
private IndexSearcher searcher;
private final Query query;
private final BitmapDocumentFormat format;
private final int rangesPerPage;
private final int[] labels;
private ScoreDoc lastDoc;
PageOfRangesIterator( ... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_PageOfRangesIterator.java |
4,764 | {
@Override
public void process( NodePropertyUpdate update ) throws IOException, IndexEntryConflictException
{
updates.add( update );
}
@Override
public void close() throws IOException, IndexEntryConflictException
... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_NonUniqueLuceneIndexPopulator.java |
4,765 | class NonUniqueLuceneIndexPopulator extends LuceneIndexPopulator
{
static final int DEFAULT_QUEUE_THRESHOLD = 10000;
private final int queueThreshold;
private final List<NodePropertyUpdate> updates = new ArrayList<>();
NonUniqueLuceneIndexPopulator( int queueThreshold, LuceneDocumentStructure documentS... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_NonUniqueLuceneIndexPopulator.java |
4,766 | class NonUniqueLuceneIndexAccessor extends LuceneIndexAccessor
{
NonUniqueLuceneIndexAccessor( LuceneDocumentStructure documentStructure,
LuceneIndexWriterFactory indexWriterFactory, IndexWriterStatus writerStatus,
DirectoryFactory dirFactory, File... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_NonUniqueLuceneIndexAccessor.java |
4,767 | {
@Override
protected boolean matchesSafely( Document item )
{
return equal( fields( document ), fields( item ) );
}
@Override
public void describeTo( Description description )
{
description.appe... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_NodeRangeDocumentLabelScanStorageStrategyTest.java |
4,768 | @RunWith(Parameterized.class)
public class NodeRangeDocumentLabelScanStorageStrategyTest
{
@Parameterized.Parameters(name = "{0} bits")
public static List<Object[]> formats()
{
ArrayList<Object[]> parameters = new ArrayList<>();
for ( BitmapDocumentFormat format : BitmapDocumentFormat.values... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_NodeRangeDocumentLabelScanStorageStrategyTest.java |
4,769 | public class NodeRangeDocumentLabelScanStorageStrategy implements LabelScanStorageStrategy
{
// This must be high to avoid to many calls to the lucene searcher. Tweak using LabelScanBenchmark
private static final int RANGES_PER_PAGE = 4096;
private final BitmapDocumentFormat format;
public NodeRangeDoc... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_NodeRangeDocumentLabelScanStorageStrategy.java |
4,770 | public class LuceneSnapshotterTest
{
private final File indexDir = new File(".");
private SnapshotDeletionPolicy snapshotPolicy;
private IndexCommit luceneSnapshot;
private IndexWriter writer;
@Before
public void setup() throws IOException
{
writer = mock(IndexWriter.class);
... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_LuceneSnapshotterTest.java |
4,771 | private class LuceneSnapshotIterator extends PrefetchingIterator<File> implements ResourceIterator<File>
{
private final File indexDirectory;
private final SnapshotDeletionPolicy deletionPolicy;
private Iterator<String> fileNames;
LuceneSnapshotIterator( File indexDirectory, Ind... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_LuceneSnapshotter.java |
4,772 | public class LuceneSnapshotter
{
private static final String NO_INDEX_COMMIT_TO_SNAPSHOT = "No index commit to snapshot";
private static final String ID = "backup";
ResourceIterator<File> snapshot( File indexDir, IndexWriter writer ) throws IOException
{
SnapshotDeletionPolicy deletionPolicy = ... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_LuceneSnapshotter.java |
4,773 | public class LuceneSchemaIndexProviderTest extends IndexProviderCompatibilityTestSuite
{
@Override
protected LuceneSchemaIndexProvider createIndexProvider()
{
return new LuceneSchemaIndexProvider( new DirectoryFactory.InMemoryDirectoryFactory(),
new Config( stringMap( "store_dir", fo... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_LuceneSchemaIndexProviderTest.java |
4,774 | @Service.Implementation(KernelExtensionFactory.class)
public class LuceneSchemaIndexProviderFactory extends
KernelExtensionFactory<LuceneSchemaIndexProviderFactory.Dependencies>
{
static final String KEY = "lucene";
public static final SchemaIndexProvider.Descriptor PROVIDER_DESCRIPTOR =
ne... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_LuceneSchemaIndexProviderFactory.java |
4,775 | public class LuceneSchemaIndexProvider extends SchemaIndexProvider
{
private final DirectoryFactory directoryFactory;
private final LuceneDocumentStructure documentStructure = new LuceneDocumentStructure();
private final IndexWriterStatus writerStatus = new IndexWriterStatus();
private final File rootDi... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_LuceneSchemaIndexProvider.java |
4,776 | private static class Hit
{
private final Object value;
private final Long[] nodeIds;
Hit( Object value, Long... nodeIds )
{
this.value = value;
this.nodeIds = nodeIds;
}
} | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_LuceneSchemaIndexPopulatorTest.java |
4,777 | public class LuceneSchemaIndexPopulatorTest
{
@Test
public void addingValuesShouldPersistThem() throws Exception
{
// WHEN
index.add( 1, "First" );
index.add( 2, "Second" );
index.add( 3, (byte)1 );
index.add( 4, (short)2 );
index.add( 5, 3 );
index.a... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_LuceneSchemaIndexPopulatorTest.java |
4,778 | {
@Override
public List<Long> apply( GraphDatabaseService graphDb )
{
ArrayList<Long> ids = new ArrayList<>();
for ( Node node : graphDb.findNodesByLabelAndProperty( label, propertyKey, value ) )
{
ids.add( n... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_UniqueIndexApplicationIT.java |
4,779 | class UniqueLuceneIndexAccessor extends LuceneIndexAccessor
{
public UniqueLuceneIndexAccessor( LuceneDocumentStructure documentStructure,
LuceneIndexWriterFactory indexWriterFactory, IndexWriterStatus writerStatus,
DirectoryFactory dirFact... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_UniqueLuceneIndexAccessor.java |
4,780 | private class LuceneUniquePropertyIndexUpdater extends UniquePropertyIndexUpdater
{
final IndexUpdater delegate;
public LuceneUniquePropertyIndexUpdater( IndexUpdater delegate )
{
this.delegate = delegate;
}
@Override
protected void flushUpdates( Ite... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_UniqueLuceneIndexAccessor.java |
4,781 | public class LongPageIteratorTest
{
@Test
public void shouldIterateThroughEachLongInEachPage() throws Exception
{
// given
LongPageIterator iterator = new LongPageIterator( asList( new long[]{1, 2, 3}, new long[]{4, 5} ).iterator() );
// then
assertTrue( iterator.hasNext() )... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_bitmaps_LongPageIteratorTest.java |
4,782 | {
@Override
public long maxCount()
{
return 0;
}
@Override public void close() throws IOException
{
}
@Override public Iterator<Long> iterator()
... | false | community_kernel_src_main_java_org_neo4j_kernel_api_index_IndexAccessor.java |
4,783 | class Adapter implements IndexAccessor
{
@Override
public void drop()
{
}
@Override
public IndexUpdater newUpdater( IndexUpdateMode mode )
{
return SwallowingIndexUpdater.INSTANCE;
}
@Override
public void force()
... | false | community_kernel_src_main_java_org_neo4j_kernel_api_index_IndexAccessor.java |
4,784 | public class InMemoryIndexIndexProviderApprovalTest extends SchemaIndexProviderApprovalTest
{
public InMemoryIndexIndexProviderApprovalTest( TestValue value )
{
super( value );
}
} | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_InMemoryIndexIndexProviderApprovalTest.java |
4,785 | public class InMemoryIndexConstraintProviderApprovalTest extends SchemaConstraintProviderApprovalTest
{
public InMemoryIndexConstraintProviderApprovalTest( TestValue value )
{
super( value );
}
} | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_InMemoryIndexConstraintProviderApprovalTest.java |
4,786 | public class DuplicateIndexEntryConflictExceptionTest
{
@Test
public void messageShouldIncludePropertyValueAndNodeIds() throws Exception
{
// given
DuplicateIndexEntryConflictException e = new DuplicateIndexEntryConflictException( "value1", asSet(11l, 22l, 33l) );
// then
as... | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_DuplicateIndexEntryConflictExceptionTest.java |
4,787 | public class DuplicateIndexEntryConflictException extends IndexEntryConflictException
{
private final Object propertyValue;
private final Set<Long> conflictingNodeIds;
public DuplicateIndexEntryConflictException( Object propertyValue, Set<Long> conflictingNodeIds )
{
super( String.format( "Mult... | false | community_kernel_src_main_java_org_neo4j_kernel_api_index_DuplicateIndexEntryConflictException.java |
4,788 | public class ArrayEncoderTest
{
@Test
public void shouldEncodeArrays() throws Exception
{
assertEquals( "D1.0|2.0|3.0|", ArrayEncoder.encode( new int[]{1, 2, 3} ) );
assertEquals( "Ztrue|false|", ArrayEncoder.encode( new boolean[]{true, false} ) );
assertEquals( "LYWxp|YXJl|eW91|b2s=... | false | community_kernel_src_test_java_org_neo4j_kernel_api_index_ArrayEncoderTest.java |
4,789 | public class ArrayEncoder
{
private static final BASE64Encoder base64Encoder = new BASE64Encoder();
private static final BASE64Decoder base64Decoder = new BASE64Decoder();
public static String encode( Object array )
{
if ( !array.getClass().isArray() )
{
throw new IllegalArg... | false | community_kernel_src_main_java_org_neo4j_kernel_api_index_ArrayEncoder.java |
4,790 | public class LongPageIterator implements PrimitiveLongIterator
{
private final Iterator<long[]> source;
private long[] current;
private int offset;
public LongPageIterator( Iterator<long[]> source )
{
this.source = source;
}
@Override
public boolean hasNext()
{
whil... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_bitmaps_LongPageIterator.java |
4,791 | public class UniqueLuceneIndexAccessorTest
{
private final DirectoryFactory directoryFactory = new DirectoryFactory.InMemoryDirectoryFactory();
private final File indexDirectory = new File( "index1" );
@Test
public void shouldAddUniqueEntries() throws Exception
{
// given
UniqueLuce... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_UniqueLuceneIndexAccessorTest.java |
4,792 | public class BitmapFormatTest
{
@Test
public void shouldConvertRangeAndBitmapToArray_32() throws Exception
{
// given
for ( int i = 0; i < 32; i++ )
{
// when
long[] longs = BitmapFormat._32.convertRangeAndBitmapToArray( 16, 1L << i );
// then
... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_bitmaps_BitmapFormatTest.java |
4,793 | public class BitmapExtractorTest
{
@Test
public void shouldIterateOverAllIdsInPage() throws Exception
{
// given
BitmapExtractor pages = new BitmapExtractor( BitmapFormat._64,
// first range
... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_bitmaps_BitmapExtractorTest.java |
4,794 | public class BitmapExtractor extends PrefetchingIterator<long[]>
{
private final BitmapFormat format;
private final long[] rangeBitmap;
private int offset;
public BitmapExtractor( BitmapFormat format, long... rangeBitmap )
{
this.format = format;
this.rangeBitmap = rangeBitmap;
... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_bitmaps_BitmapExtractor.java |
4,795 | public class Bitmap
{
long bitmap;
public Bitmap()
{
}
public Bitmap( long bitmap )
{
this.bitmap = bitmap;
}
public long bitmap()
{
return bitmap;
}
public boolean hasContent()
{
return bitmap != 0;
}
} | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_bitmaps_Bitmap.java |
4,796 | public class WriterLogicTest
{
@Test
public void forceShouldSetOnlineStatus() throws Exception
{
// GIVEN
IndexWriter writer = newWriter();
writer.addDocument( newDocument() );
logic.commitAsOnline( writer );
// WHEN
writer.close( true );
//... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_WriterLogicTest.java |
4,797 | public class UniqueLuceneIndexPopulatorTest
{
@Test
public void shouldAddUniqueUniqueLuceneIndexPopulatorTestEntries() throws Exception
{
// given
DirectoryFactory.InMemoryDirectoryFactory directoryFactory = new DirectoryFactory.InMemoryDirectoryFactory();
File indexDirectory = new F... | false | community_lucene-index_src_test_java_org_neo4j_kernel_api_impl_index_UniqueLuceneIndexPopulatorTest.java |
4,798 | {
@Override
public void process( NodePropertyUpdate update ) throws IOException, IndexEntryConflictException
{
add( update.getNodeId(), update.getValueAfter() );
}
@Override
public void close() throws IOException, IndexEntr... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_UniqueLuceneIndexPopulator.java |
4,799 | @Deprecated
class UniqueLuceneIndexPopulator extends LuceneIndexPopulator
{
static final int DEFAULT_BATCH_SIZE = 1024;
private static final float LOAD_FACTOR = 0.75f;
private final int batchSize;
private SearcherManager searcherManager;
private Map<Object, Long> currentBatch = newBatchMap();
U... | false | community_lucene-index_src_main_java_org_neo4j_kernel_api_impl_index_UniqueLuceneIndexPopulator.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.