congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
RecordStore.getRecordSize
Code IndexAdd Tabnine to your IDE (free)

How to use
getRecordSize
method
in
org.neo4j.kernel.impl.store.RecordStore

Best Java code snippets using org.neo4j.kernel.impl.store.RecordStore.getRecordSize (Showing top 20 results out of 315)

origin: neo4j/neo4j

  private byte[] newRecordBuffer()
  {
    return new byte[schemaStore.getRecordSize() * 4];
  }
}
origin: neo4j/neo4j

@Override
public int getRecordSize()
{
  return actual.getRecordSize();
}
origin: neo4j/neo4j

  @Override
  protected long position()
  {
    return store.getHighId() * store.getRecordSize();
  }
}
origin: neo4j/neo4j

public UpdateRecordsStep( StageControl control, Configuration config, RecordStore<RECORD> store,
    PrepareIdSequence prepareIdSequence )
{
  super( control, "v", config, config.parallelRecordWrites() ? 0 : 1 );
  this.store = store;
  this.prepareIdSequence = prepareIdSequence;
  this.recordSize = store.getRecordSize();
}
origin: neo4j/neo4j

  public static RecordStore<DynamicRecord> configureDynamicStore( int blockSize )
  {
    @SuppressWarnings( "unchecked" )
    RecordStore<DynamicRecord> mock = mock( RecordStore.class );
    when( mock.getRecordSize() ).thenReturn( blockSize + DynamicRecordFormat.RECORD_HEADER_SIZE );
    when( mock.getRecordDataSize() ).thenReturn( blockSize );
    return mock;
  }
}
origin: neo4j/neo4j

@Override
public Collection<StoreFileMetadata> listStorageFiles()
{
  List<StoreFileMetadata> files = new ArrayList<>();
  for ( StoreType type : StoreType.values() )
  {
    if ( type.equals( StoreType.COUNTS ) )
    {
      addCountStoreFiles( files );
    }
    else
    {
      final RecordStore<AbstractBaseRecord> recordStore = neoStores.getRecordStore( type );
      StoreFileMetadata metadata =
          new StoreFileMetadata( recordStore.getStorageFile(), recordStore.getRecordSize() );
      files.add( metadata );
    }
  }
  return files;
}
origin: neo4j/neo4j

@Test
public void ioThroughputStatDoesNotOverflow()
{
  // store with huge record size to force overflow and not create huge batch of records
  RecordStore<NodeRecord> store = mock( RecordStore.class );
  when( store.getRecordSize() ).thenReturn( Integer.MAX_VALUE / 2 );
  Configuration configuration = mock( Configuration.class );
  StageControl stageControl = mock( StageControl.class );
  UpdateRecordsStep<NodeRecord> step = new UpdateRecordsStep<>( stageControl, configuration, store, new StorePrepareIdSequence() );
  NodeRecord record = new NodeRecord( 1 );
  record.setInUse( true );
  NodeRecord[] batch = new NodeRecord[11];
  Arrays.fill( batch, record );
  step.process( batch, mock( BatchSender.class ) );
  Stat stat = step.stat( Keys.io_throughput );
  assertThat( stat.asLong(), greaterThan( 0L ) );
}
origin: neo4j/neo4j

  public CountGroupsStage( Configuration config, RecordStore<RelationshipGroupRecord> store,
      RelationshipGroupCache groupCache, StatsProvider... additionalStatsProviders )
  {
    super( NAME, null, config, RECYCLE_BATCHES );
    add( new BatchFeedStep( control(), config, allIn( store, config ), store.getRecordSize() ) );
    add( new ReadRecordsStep<>( control(), config, false, store ) );
    add( new CountGroupsStep( control(), config, groupCache, additionalStatsProviders ) );
  }
}
origin: neo4j/neo4j

  public ScanAndCacheGroupsStage( Configuration config, RecordStore<RelationshipGroupRecord> store,
      RelationshipGroupCache cache, StatsProvider... additionalStatsProviders )
  {
    super( NAME, null, config, RECYCLE_BATCHES );
    add( new BatchFeedStep( control(), config, allInReversed( store, config ), store.getRecordSize() ) );
    add( new ReadRecordsStep<>( control(), config, false, store ) );
    add( new CacheGroupsStep( control(), config, cache, additionalStatsProviders ) );
  }
}
origin: neo4j/neo4j

  public NodeFirstGroupStage( Configuration config, RecordStore<RelationshipGroupRecord> groupStore,
      NodeStore nodeStore, ByteArray cache )
  {
    super( NAME, null, config, 0 );
    add( new BatchFeedStep( control(), config, allIn( groupStore, config ), groupStore.getRecordSize() ) );
    add( new ReadRecordsStep<>( control(), config, true, groupStore ) );
    add( new NodeSetFirstGroupStep( control(), config, nodeStore, cache ) );
    add( new UpdateRecordsStep<>( control(), config, nodeStore, new StorePrepareIdSequence() ) );
  }
}
origin: org.neo4j/neo4j-kernel

  private byte[] newRecordBuffer()
  {
    return new byte[schemaStore.getRecordSize() * 4];
  }
}
origin: org.neo4j/neo4j-kernel

@Override
public int getRecordSize()
{
  return actual.getRecordSize();
}
origin: org.neo4j/neo4j-kernel

  @Override
  protected long position()
  {
    return store.getHighId() * store.getRecordSize();
  }
}
origin: org.neo4j/neo4j-kernel

public UpdateRecordsStep( StageControl control, Configuration config, RecordStore<RECORD> store,
    PrepareIdSequence prepareIdSequence )
{
  super( control, "v", config, config.parallelRecordWrites() ? 0 : 1 );
  this.store = store;
  this.prepareIdSequence = prepareIdSequence;
  this.recordSize = store.getRecordSize();
}
origin: stackoverflow.com

byte[] recData = null;
 int len;
 RecordStore rs = RecordStore.openRecordStore("StoryDataBase1", true);
 if (rs.getNumRecords() > 0) {
 recData = new byte[rs.getRecordSize(1)];
 len = rs.getRecord(1, recData, 0);
 String value = new String(recData, 0, len);
 if(value == null) {
 ....
 } else {
 ...
  }
 }
origin: org.neo4j/neo4j-consistency-check-legacy

  public static RecordStore<DynamicRecord> configureDynamicStore( int blockSize )
  {
    @SuppressWarnings( "unchecked" )
    RecordStore<DynamicRecord> mock = mock( RecordStore.class );
    when( mock.getRecordSize() ).thenReturn( blockSize + AbstractDynamicStore.BLOCK_HEADER_SIZE );
    when( mock.getRecordHeaderSize() ).thenReturn( AbstractDynamicStore.BLOCK_HEADER_SIZE );
    return mock;
  }
}
origin: org.neo4j/neo4j-consistency-check-legacy

@SuppressWarnings("unchecked")
private StoreAccess storeAccess( long highId, int recordSize )
{
  StoreAccess storeAccess = mock( StoreAccess.class );
  RecordStore recordStore = mock( RecordStore.class );
  when( multiPassStore().getRecordStore( storeAccess ) ).thenReturn( recordStore );
  when( recordStore.getHighId() ).thenReturn( highId );
  when( recordStore.getRecordSize() ).thenReturn( recordSize );
  return storeAccess;
}
origin: org.neo4j/neo4j-kernel

  public ScanAndCacheGroupsStage( Configuration config, RecordStore<RelationshipGroupRecord> store,
      RelationshipGroupCache cache, StatsProvider... additionalStatsProviders )
  {
    super( NAME, null, config, RECYCLE_BATCHES );
    add( new BatchFeedStep( control(), config, allInReversed( store, config ), store.getRecordSize() ) );
    add( new ReadRecordsStep<>( control(), config, false, store ) );
    add( new CacheGroupsStep( control(), config, cache, additionalStatsProviders ) );
  }
}
origin: org.neo4j/neo4j-kernel

  public CountGroupsStage( Configuration config, RecordStore<RelationshipGroupRecord> store,
      RelationshipGroupCache groupCache, StatsProvider... additionalStatsProviders )
  {
    super( NAME, null, config, RECYCLE_BATCHES );
    add( new BatchFeedStep( control(), config, allIn( store, config ), store.getRecordSize() ) );
    add( new ReadRecordsStep<>( control(), config, false, store ) );
    add( new CountGroupsStep( control(), config, groupCache, additionalStatsProviders ) );
  }
}
origin: org.neo4j/neo4j-kernel

  public NodeFirstGroupStage( Configuration config, RecordStore<RelationshipGroupRecord> groupStore,
      NodeStore nodeStore, ByteArray cache )
  {
    super( NAME, null, config, 0 );
    add( new BatchFeedStep( control(), config, allIn( groupStore, config ), groupStore.getRecordSize() ) );
    add( new ReadRecordsStep<>( control(), config, true, groupStore ) );
    add( new NodeSetFirstGroupStep( control(), config, nodeStore, cache ) );
    add( new UpdateRecordsStep<>( control(), config, nodeStore, new StorePrepareIdSequence() ) );
  }
}
org.neo4j.kernel.impl.storeRecordStoregetRecordSize

Popular methods of RecordStore

  • getRecord
    Utility methods for reading records. These are not on the interface itself since it should be an exp
  • getHighId
  • newRecord
  • updateRecord
    Updates this store with the contents of record at the record id AbstractBaseRecord#getId() by the re
  • nextId
  • getRecordDataSize
  • setHighestPossibleIdInUse
    Sets highest id in use for this store. This is for when records are applied to this store where the
  • ensureHeavy
    For stores that have other stores coupled underneath, the "top level" record will have a flag saying
  • getNumberOfReservedLowIds
    Some stores may have meta data stored in the header of the store file. Since all records in a store
  • getRecordsPerPage
  • getStorageFile
  • prepareForCommit
    Called once all changes to a record is ready to be converted into a command. WARNING this is for adv
  • getStorageFile,
  • prepareForCommit,
  • accept,
  • addRecord,
  • close,
  • closeRecordStore,
  • deleteRecord,
  • enumerateRecords,
  • flush

Popular in Java

  • Making http requests using okhttp
  • startActivity (Activity)
  • putExtra (Intent)
  • notifyDataSetChanged (ArrayAdapter)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now