use of org.neo4j.com.Serializer in project neo4j by neo4j.
the class MasterClient214 method allocateIds.
@Override
public Response<IdAllocation> allocateIds(RequestContext context, final IdType idType) {
Serializer serializer = buffer -> buffer.writeByte(idType.ordinal());
Deserializer<IdAllocation> deserializer = (buffer, temporaryBuffer) -> readIdAllocation(buffer);
return sendRequest(requestTypes.type(HaRequestTypes.Type.ALLOCATE_IDS), context, serializer, deserializer);
}
use of org.neo4j.com.Serializer in project neo4j by neo4j.
the class MasterClient214 method createRelationshipType.
@Override
public Response<Integer> createRelationshipType(RequestContext context, final String name) {
Serializer serializer = buffer -> writeString(buffer, name);
Deserializer<Integer> deserializer = (buffer, temporaryBuffer) -> buffer.readInt();
return sendRequest(requestTypes.type(HaRequestTypes.Type.CREATE_RELATIONSHIP_TYPE), context, serializer, deserializer);
}
use of org.neo4j.com.Serializer in project neo4j by neo4j.
the class MasterClient214 method createLabel.
@Override
public Response<Integer> createLabel(RequestContext context, final String name) {
Serializer serializer = buffer -> writeString(buffer, name);
Deserializer<Integer> deserializer = (buffer, temporaryBuffer) -> buffer.readInt();
return sendRequest(requestTypes.type(HaRequestTypes.Type.CREATE_LABEL), context, serializer, deserializer);
}
use of org.neo4j.com.Serializer in project neo4j by neo4j.
the class MasterClient214 method commit.
@Override
public Response<Long> commit(RequestContext context, TransactionRepresentation tx) {
Serializer serializer = new Protocol.TransactionSerializer(tx);
Deserializer<Long> deserializer = (buffer, temporaryBuffer) -> buffer.readLong();
return sendRequest(requestTypes.type(HaRequestTypes.Type.COMMIT), context, serializer, deserializer);
}
use of org.neo4j.com.Serializer in project neo4j by neo4j.
the class MasterClient214 method createPropertyKey.
@Override
public Response<Integer> createPropertyKey(RequestContext context, final String name) {
Serializer serializer = buffer -> writeString(buffer, name);
Deserializer<Integer> deserializer = (buffer, temporaryBuffer) -> buffer.readInt();
return sendRequest(requestTypes.type(HaRequestTypes.Type.CREATE_PROPERTY_KEY), context, serializer, deserializer);
}
Aggregations