Example #1
0
 internal RandomValueGenerator(ValueCreatorUtil <KEY, VALUE> outerInstance, RandomValues randomValues, ValueType[] types, double fractionDuplicates)
 {
     this._outerInstance      = outerInstance;
     this.Types               = types;
     this.FractionDuplicates  = fractionDuplicates;
     this.RandomValues        = randomValues;
     this.UniqueCompareValues = new HashSet <Value>();
     this.UniqueValues        = new List <Value>();
 }
Example #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setup() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void Setup()
        {
            ValueCreatorUtil        = CreateValueCreatorUtil();
            IndexDescriptor         = ValueCreatorUtil.indexDescriptor();
            Layout                  = CreateLayout();
            IndexDirectoryStructure = directoriesByProvider(_directory.directory("root")).forProvider(IndexDescriptor.providerDescriptor());
            _indexFile              = IndexDirectoryStructure.directoryForIndex(IndexDescriptor.Id);
            Fs.mkdirs(_indexFile.ParentFile);
            PageCache = _pageCacheRule.getPageCache(Fs);
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setupTwoIndexes() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void SetupTwoIndexes()
        {
            _pageCache = _pageCacheRule.getPageCache(Fs);

            // Define two indexes based on different labels and different configuredSettings
            _layoutUtil1            = CreateLayoutTestUtil(_indexId1, 42);
            _layoutUtil2            = CreateLayoutTestUtil(_indexId2, 43);
            _schemaIndexDescriptor1 = _layoutUtil1.indexDescriptor();
            _schemaIndexDescriptor2 = _layoutUtil2.indexDescriptor();

            // Create the two indexes as empty, based on differently configured configuredSettings above
            CreateEmptyIndex(_schemaIndexDescriptor1, _configuredSettings1);
            CreateEmptyIndex(_schemaIndexDescriptor2, _configuredSettings2);
        }
Example #4
0
 internal ValueCreatorUtil(ValueCreatorUtil @delegate) : this(@delegate.IndexDescriptorConflict, @delegate._supportedTypes, @delegate._fractionDuplicates)
 {
 }
Example #5
0
 internal RandomUpdateGenerator(ValueCreatorUtil <KEY, VALUE> outerInstance, IEnumerator <Value> valueIterator)
 {
     this._outerInstance = outerInstance;
     this.ValueIterator  = valueIterator;
 }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void addUpdates(SpatialIndexProvider provider, org.neo4j.storageengine.api.schema.StoreIndexDescriptor schemaIndexDescriptor, ValueCreatorUtil<SpatialIndexKey,NativeIndexValue> layoutUtil) throws java.io.IOException, org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException
        private void AddUpdates(SpatialIndexProvider provider, StoreIndexDescriptor schemaIndexDescriptor, ValueCreatorUtil <SpatialIndexKey, NativeIndexValue> layoutUtil)
        {
            IndexAccessor accessor = provider.GetOnlineAccessor(schemaIndexDescriptor, SamplingConfig());

            using (IndexUpdater updater = accessor.NewUpdater(ONLINE))
            {
                // when
                foreach (IndexEntryUpdate <IndexDescriptor> update in layoutUtil.SomeUpdates(_randomRule))
                {
                    updater.Process(update);
                }
            }
            accessor.Force(Org.Neo4j.Io.pagecache.IOLimiter_Fields.Unlimited);
            accessor.Dispose();
        }