RelationshipRecord.<init>
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.neo4j.kernel.impl.store.record.RelationshipRecord.<init>(Showing top 15 results out of 315)

origin: neo4j/neo4j

@Test
public void shouldReportRelationshipForOtherNodes() throws Exception
{
  // given
  NodeRecord node = inUse( new NodeRecord( 42, false, 7, NONE ) );
  RelationshipRecord relationship = add( inUse( new RelationshipRecord( 7, 1, 2, 0 ) ) );
  // when
  ConsistencyReport.NodeConsistencyReport report = check( node );
  // then
  verify( report ).relationshipForOtherNode( relationship );
  verifyNoMoreInteractions( report );
}
origin: neo4j/neo4j

@Override
public RelationshipRecord newRecord()
{
  return new RelationshipRecord( -1 );
}
origin: neo4j/neo4j

  private StoreSingleRelationshipCursor createRelationshipCursor()
  {
    InstanceCache<StoreSingleRelationshipCursor> instanceCache = mock(InstanceCache.class);
    return new StoreSingleRelationshipCursor( new RelationshipRecord( -1 ), instanceCache,
        new RecordCursors( neoStores ), LockService.NO_LOCK_SERVICE );
  }
}
origin: neo4j/neo4j

@Override
public RelationshipRecord clone()
{
  RelationshipRecord record = new RelationshipRecord( getId() ).initialize( inUse(), nextProp, firstNode,
      secondNode, type, firstPrevRel, firstNextRel, secondPrevRel, secondNextRel, firstInFirstChain,
      firstInSecondChain );
  record.setSecondaryUnitId( getSecondaryUnitId() );
  return record;
}
origin: neo4j/neo4j

private RelationshipRecord createRelationship( long id, long nextRelationship )
{
  return new RelationshipRecord( id, true, getFirstNode(), getSecondNode(), TYPE, NO_NEXT_RELATIONSHIP.intValue(),
      nextRelationship, NO_NEXT_RELATIONSHIP.intValue(), nextRelationship, false, false );
}
origin: neo4j/neo4j

@Test
public void useVariableLengthFormatWhenRecordSizeIsTooSmall() throws IOException
{
  RelationshipRecord source = new RelationshipRecord( 1 );
  RelationshipRecord target = new RelationshipRecord( 1 );
  source.initialize( true, randomFixedReference(), randomFixedReference(), randomFixedReference(), randomType(),
      randomFixedReference(), randomFixedReference(), randomFixedReference(), randomFixedReference(),
      true, true );
  writeReadRecord( source, target, RelationshipRecordFormat.FIXED_FORMAT_RECORD_SIZE - 1 );
  assertFalse( "Record should use variable length reference if format record is too small.", target.isUseFixedReferences() );
  verifySameReferences( source, target);
}
origin: neo4j/neo4j

@Test
public void shouldNotReportAnythingForNodeWithConsistentReferences() throws Exception
{
  // given
  NodeRecord node = inUse( new NodeRecord( 42, false, 7, 11 ) );
  add( inUse( new RelationshipRecord( 7, 42, 0, 0 ) ) );
  add( inUse( new PropertyRecord( 11 ) ) );
  // when
  ConsistencyReport.NodeConsistencyReport report = check( node );
  // then
  verifyNoMoreInteractions( report );
}
origin: neo4j/neo4j

@Override
public Generator<RelationshipRecord> relationship()
{
  return ( recordSize, format, recordId ) -> new RelationshipRecord( recordId ).initialize(
      random.nextBoolean(),
      randomLongOrOccasionallyNull( propertyBits ),
      random.nextLong( entityBits ), random.nextLong( entityBits ), randomInt( tokenBits ),
      randomLongOrOccasionallyNull( entityBits ), randomLongOrOccasionallyNull( entityBits ),
      randomLongOrOccasionallyNull( entityBits ), randomLongOrOccasionallyNull( entityBits ),
      random.nextBoolean(), random.nextBoolean() );
}
origin: neo4j/neo4j

  private static RelationshipRecord relationship( long id, long startNodeId, long endNodeId )
  {
    return new RelationshipRecord( id ).initialize( true, Record.NO_NEXT_PROPERTY.longValue(),
        startNodeId, endNodeId, 0, NULL_REFERENCE.longValue(), NULL_REFERENCE.longValue(),
        NULL_REFERENCE.longValue(), NULL_REFERENCE.longValue(), false, false );
  }
}
origin: neo4j/neo4j

public static RelationshipCommand createRelationship( long id, long startNode, long endNode, int type )
{
  RelationshipRecord before = new RelationshipRecord( id );
  before.setInUse( false );
  RelationshipRecord after = new RelationshipRecord( id, startNode, endNode, type );
  after.setInUse( true );
  after.setCreated();
  return new RelationshipCommand( before, after );
}
origin: neo4j/neo4j

@Test
public void useVariableLengthFormatWhenAtLeastOneOfTheReferencesIsTooBig() throws IOException
{
  RelationshipRecord source = new RelationshipRecord( 1 );
  RelationshipRecord target = new RelationshipRecord( 1 );
  verifyRecordsWithPoisonedReference( source, target, 1L << Integer.SIZE + 5, randomType() );
}
origin: neo4j/neo4j

public void delete(  RelationshipRecord record  )
{
  record.setInUse( false );
  add( record, new RelationshipRecord( record.getId() ) );
}
origin: neo4j/neo4j

@Test
public void useVariableLengthFormatWhenTypeIsTooBig() throws IOException
{
  RelationshipRecord source = new RelationshipRecord( 1 );
  RelationshipRecord target = new RelationshipRecord( 1 );
  source.initialize( true, randomFixedReference(), randomFixedReference(), randomFixedReference(), 1 << 16,
      randomFixedReference(), randomFixedReference(), randomFixedReference(), randomFixedReference(),
      true, true );
  writeReadRecord( source, target );
  assertFalse( "Record should use variable length format.", target.isUseFixedReferences() );
  verifySameReferences( source, target);
}
origin: neo4j/neo4j

@Test
public void useFixedRecordFormatWhenAtLeastOneOfTheReferencesIsMissing() throws IOException
{
  RelationshipRecord source = new RelationshipRecord( 1 );
  RelationshipRecord target = new RelationshipRecord( 1 );
  verifyRecordsWithPoisonedReference( source, target, NULL, randomShortType() );
}
origin: neo4j/neo4j

@Test
public void useFixedReferenceFormatWhenRecordCanFitInRecordSizeRecord() throws IOException
{
  RelationshipRecord source = new RelationshipRecord( 1 );
  RelationshipRecord target = new RelationshipRecord( 1 );
  source.initialize( true, randomFixedReference(), randomFixedReference(), randomFixedReference(), randomShortType(),
      randomFixedReference(), randomFixedReference(), randomFixedReference(), randomFixedReference(),
      true, true );
  writeReadRecord( source, target, RelationshipRecordFormat.FIXED_FORMAT_RECORD_SIZE );
  assertTrue( "Record should use fixed reference if can fit in format record.", target.isUseFixedReferences() );
  verifySameReferences( source, target);
}
org.neo4j.kernel.impl.store.recordRelationshipRecord<init>

Popular methods of RelationshipRecord

  • getFirstPrevRel
  • getFirstNextRel
  • getId
  • isFirstInFirstChain
  • getFirstNode
  • getNextProp
  • getSecondNextRel
  • getSecondNode
  • getSecondPrevRel
  • getType
  • initialize
  • isFirstInSecondChain
  • initialize,
  • isFirstInSecondChain,
  • setFirstNode,
  • setInUse,
  • setSecondNode,
  • isUseFixedReferences,
  • setCreated,
  • setFirstNextRel,
  • setFirstPrevRel

Popular classes and methods

  • requestLocationUpdates (LocationManager)
  • getSupportFragmentManager (FragmentActivity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with val. Returns one of the three values 1, 0, or -1. The method behaves a
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec

For IntelliJ IDEA and
Android Studio

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)