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

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

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

origin: neo4j/neo4j

public OwningNodeRelationshipChain( RelationshipChainExplorer relationshipChainExplorer,
                  RecordStore<NodeRecord> nodeStore )
{
  this.relationshipChainExplorer = relationshipChainExplorer;
  this.nodeStore = nodeStore;
  this.nodeRecord = nodeStore.newRecord();
}
origin: neo4j/neo4j

@Override
public R newRecord()
{
  return actual.newRecord();
}
origin: neo4j/neo4j

/**
 * Utility methods for reading records. These are not on the interface itself since it should be
 * an explicit choice when to create the record instances passed into it.
 * Also for mocking purposes it's less confusing and error prone having only a single method.
 */
static <R extends AbstractBaseRecord> R getRecord( RecordStore<R> store, long id, RecordLoad mode )
{
  R record = store.newRecord();
  store.getRecord( id, record, mode );
  return record;
}
origin: neo4j/neo4j

@Override
public NodeRecord load( long key, Void additionalData )
{
  return store.getRecord( key, store.newRecord(), NORMAL );
}
origin: neo4j/neo4j

@Override
public RelationshipRecord load( long key, Void additionalData )
{
  return store.getRecord( key, store.newRecord(), NORMAL );
}
origin: neo4j/neo4j

@Override
public RelationshipGroupRecord load( long key, Integer type )
{
  return store.getRecord( key, store.newRecord(), NORMAL );
}
origin: neo4j/neo4j

@Override
public PropertyKeyTokenRecord load( long key, Void additionalData )
{
  return store.getRecord( key, store.newRecord(), NORMAL );
}
origin: neo4j/neo4j

@Override
public LabelTokenRecord load( long key, Void additionalData )
{
  return store.getRecord( key, store.newRecord(), NORMAL );
}
origin: neo4j/neo4j

@Override
public RelationshipTypeTokenRecord load( long key, Void additionalData )
{
  return store.getRecord( key, store.newRecord(), NORMAL );
}
origin: neo4j/neo4j

  private static <T extends AbstractBaseRecord> T[] readAllRecords( Class<T> type, RecordStore<T> store )
  {
    @SuppressWarnings( "unchecked" )
    T[] records = (T[]) Array.newInstance( type, (int) store.getHighId() );
    for ( int i = 0; i < records.length; i++ )
    {
      records[i] = store.getRecord( i, store.newRecord(), FORCE );
    }
    return records;
  }
}
origin: neo4j/neo4j

  private static Set<Long> labelsFor( RecordStore<NodeRecord> nodeStore,
                    CheckerEngine<? extends AbstractBaseRecord,? extends ConsistencyReport> engine,
                    RecordAccess recordAccess,
                    long nodeId )
  {
    return getListOfLabels( nodeStore.getRecord( nodeId, nodeStore.newRecord(), FORCE ), recordAccess, engine );
  }
}
origin: neo4j/neo4j

Scan( RecordStore<R> store, boolean forward, final Predicate<? super R>... filters )
{
  this.filters = filters;
  this.ids = new StoreIdIterator( store, forward );
  this.store = store;
  this.cursor = store.openPageCursorForReading( 0 );
  this.record = store.newRecord();
}
origin: neo4j/neo4j

protected RecordSet<RelationshipRecord> followChainFromNode( long nodeId, long relationshipId )
{
  return expandChain( recordStore.getRecord( relationshipId, recordStore.newRecord(), NORMAL ), nodeId, NEXT );
}
origin: neo4j/neo4j

<RECORD extends AbstractBaseRecord> DirectRecordReference<RECORD> referenceTo( RecordStore<RECORD> store, long id )
{
  return new DirectRecordReference<>( store.getRecord( id, store.newRecord(), FORCE ), this );
}
origin: neo4j/neo4j

protected R getForce( S store, int id )
{
  return store.getRecord( id, store.newRecord(), RecordLoad.FORCE );
}
origin: neo4j/neo4j

  public void warmUpCache()
  {
    int recordsPerPage = store.getRecordsPerPage();
    long id = 0;
    long half = store.getHighId() / 2;
    RECORD record = store.newRecord();
    while ( id < half )
    {
      store.getRecord( id, record, FORCE );
      id += recordsPerPage - 1;
    }
  }
}
origin: neo4j/neo4j

protected R getHeavy( S store, int id )
{
  R record = store.getRecord( id, store.newRecord(), NORMAL );
  store.ensureHeavy( record );
  return record;
}
origin: neo4j/neo4j

private static void breakTheChain( RecordStore<RelationshipRecord> relationshipStore )
{
  RelationshipRecord record = relationshipStore.getRecord( 10, relationshipStore.newRecord(), NORMAL );
  long relationshipTowardsEndOfChain = record.getFirstNode();
  while ( record.inUse() && !record.isFirstInFirstChain() )
  {
    record = relationshipStore.getRecord( relationshipTowardsEndOfChain, relationshipStore.newRecord(), FORCE );
    relationshipTowardsEndOfChain = record.getFirstPrevRel();
  }
  relationshipStore.updateRecord( new RelationshipRecord( relationshipTowardsEndOfChain, 0, 0, 0 ) );
}
origin: neo4j/neo4j

public static <RECORD extends AbstractBaseRecord> int numberOfRecordsInUse( RecordStore<RECORD> store )
{
  int inUse = 0;
  for ( long id = store.getNumberOfReservedLowIds(); id < store.getHighId(); id++ )
  {
    RECORD record = store.getRecord( id, store.newRecord(), RecordLoad.FORCE );
    if ( record.inUse() )
    {
      inUse++;
    }
  }
  return inUse;
}
origin: neo4j/neo4j

@Test
public void shouldLoadAllConnectedRelationshipRecordsAndTheirFullChainsOfRelationshipRecords()
{
  // given
  RecordStore<RelationshipRecord> relationshipStore = store.getRelationshipStore();
  // when
  int relationshipIdInMiddleOfChain = 10;
  RecordSet<RelationshipRecord> records = new RelationshipChainExplorer( relationshipStore )
      .exploreRelationshipRecordChainsToDepthTwo(
          relationshipStore.getRecord( relationshipIdInMiddleOfChain, relationshipStore.newRecord(), NORMAL ) );
  // then
  assertEquals( degreeTwoNodes * 2, records.size() );
}
org.neo4j.kernel.impl.storeRecordStorenewRecord

Popular methods of RecordStore

  • getRecord
    Utility methods for reading records. These are not on the interface itself since it should be an exp
  • getHighId
  • updateRecord
    Updates this store with the contents of record at the record id AbstractBaseRecord#getId() by the re
  • getRecordSize
  • 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
  • getResourceAsStream (ClassLoader)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSharedPreferences (Context)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Top 15 Vim Plugins
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