@Override public Path mapPath( PathValue value ) { if ( value instanceof PathWrappingPathValue ) { return ((PathWrappingPathValue) value).path(); } return new CoreAPIPath( value ); }
public void satisfyDependencies( Object... dependencies ) { for ( Object dependency : dependencies ) { satisfyDependency( dependency ); } }
public AnyValue toValue( Object obj ) { return ValueUtils.of( obj ); } }
private static DependencyResolver buildIndexDependencies( IndexProvider... providers ) { Dependencies dependencies = new Dependencies(); dependencies.satisfyDependencies( (Object[]) providers ); return dependencies; }
@Override public <T> Supplier<T> provideDependency( final Class<T> type, final SelectionStrategy selector ) { return () -> resolveDependency( type, selector ); }
@Override public void writeRelationship( long relId, long startNodeId, long endNodeId, TextValue type, MapValue properties ) throws RuntimeException { if ( relId >= 0 ) { writeValue( newRelationshipProxyById( relId ) ); } }
@Override public boolean canBeRuledOut( int numberOfVisits, Double pathPriority, Double oldPriority ) { return numberOfVisits > 0 || NoneStrictMath.compare( pathPriority, oldPriority, epsilon ) >= 0; }
@Override public void writeVirtualRelationshipHack( Object relationship ) { writeValue( relationship ); }
private WorkerCommand<Void, Object> awaitHead( final IdOrderingQueue queue, final long id ) { return state -> { queue.waitFor( id ); return null; }; } }
@Override public long[] getLastClosedTransaction() { return closedTransactionId.get(); }
public ArrayQueueOutOfOrderSequence( long startingNumber, int initialArraySize, long[] initialMeta ) { this.highestGapFreeNumber = startingNumber; this.highestEverSeen = startingNumber; this.highestGapFreeMeta = this.metaArray = initialMeta; this.outOfOrderQueue = new SequenceArray( initialMeta.length + 1, initialArraySize ); }
@Override public synchronized void set( long number, long[] meta ) { highestEverSeen = number; highestGapFreeNumber = number; highestGapFreeMeta = meta; outOfOrderQueue.clear(); }
LongerShortString( int encodingHeader, int step ) { this.encodingHeader = encodingHeader; this.mask = Bits.rightOverflowMask( step ); this.step = step; }
public Client( int worstCaseLongsNeeded ) { this.labelScratch = new long[worstCaseLongsNeeded]; this.labelBits = bitsFromLongs( labelScratch ); } }
@Override public void writeNull() throws RuntimeException { writeValue( null ); }
@Override public void writeInteger( short value ) throws RuntimeException { writeValue( value ); }
@Override public void writeFloatingPoint( float value ) throws RuntimeException { writeValue( value ); }
@Override public void writeDate( LocalDate localDate ) throws RuntimeException { writeValue( localDate ); }
@Override public void writeTime( OffsetTime offsetTime ) throws RuntimeException { writeValue( offsetTime ); }
@Override public void writeLocalDateTime( LocalDateTime localDateTime ) throws RuntimeException { writeValue( localDateTime ); }