Search in sources :

Example 6 with LongValue

use of org.neo4j.values.storable.LongValue in project neo4j by neo4j.

the class RoutingResultFormat method parse.

public static RoutingResult parse(AnyValue[] record) {
    LongValue timeToLiveSeconds = (LongValue) record[0];
    ListValue endpointData = (ListValue) record[1];
    Map<Role, List<SocketAddress>> endpoints = parseRows(endpointData);
    return new RoutingResult(endpoints.get(ROUTE), endpoints.get(WRITE), endpoints.get(READ), timeToLiveSeconds.longValue() * 1000);
}
Also used : ListValue(org.neo4j.values.virtual.ListValue) LongValue(org.neo4j.values.storable.LongValue) ArrayList(java.util.ArrayList) List(java.util.List)

Aggregations

LongValue (org.neo4j.values.storable.LongValue)6 ListValue (org.neo4j.values.virtual.ListValue)4 Test (org.junit.jupiter.api.Test)3 AnyValue (org.neo4j.values.AnyValue)3 ArrayList (java.util.ArrayList)2 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)2 LocalDate (java.time.LocalDate)1 LocalDateTime (java.time.LocalDateTime)1 ZonedDateTime (java.time.ZonedDateTime)1 List (java.util.List)1 Expression (org.neo4j.codegen.Expression)1 Entity (org.neo4j.graphdb.Entity)1 Node (org.neo4j.graphdb.Node)1 Path (org.neo4j.graphdb.Path)1 Context (org.neo4j.kernel.api.procedure.Context)1 InternalTransaction (org.neo4j.kernel.impl.coreapi.InternalTransaction)1 ValueUtils (org.neo4j.kernel.impl.util.ValueUtils)1 DateTimeValue (org.neo4j.values.storable.DateTimeValue)1 DateValue (org.neo4j.values.storable.DateValue)1 DoubleValue (org.neo4j.values.storable.DoubleValue)1