congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Start an intent from android
  • getApplicationContext (Context)
  • getSystemService (Context)
  • getExternalFilesDir (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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