Beispiel #1
0
def encode_request(name, value):
    buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE,
                                _REQUEST_MESSAGE_TYPE)
    StringCodec.encode(buf, name)
    DataCodec.encode(buf, value, True)
    return OutboundMessage(buf, True)
def encode_request(name, key, reference_id):
    buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE, _REQUEST_MESSAGE_TYPE)
    FixSizedTypesCodec.encode_long(buf, _REQUEST_REFERENCE_ID_OFFSET, reference_id)
    StringCodec.encode(buf, name)
    DataCodec.encode(buf, key, True)
    return OutboundMessage(buf, True)
def encode_request(schema_id):
    buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE, _REQUEST_MESSAGE_TYPE, True)
    FixSizedTypesCodec.encode_long(buf, _REQUEST_SCHEMA_ID_OFFSET, schema_id)
    return OutboundMessage(buf, True)
def encode_request():
    buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE,
                                _REQUEST_MESSAGE_TYPE, True)
    return OutboundMessage(buf, True)
def encode_request(group_id, name, value):
    buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE, _REQUEST_MESSAGE_TYPE)
    RaftGroupIdCodec.encode(buf, group_id)
    StringCodec.encode(buf, name)
    CodecUtil.encode_nullable(buf, value, DataCodec.encode, True)
    return OutboundMessage(buf, True)
def encode_request(name, index_config):
    buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE, _REQUEST_MESSAGE_TYPE)
    StringCodec.encode(buf, name)
    IndexConfigCodec.encode(buf, index_config, True)
    return OutboundMessage(buf, False)
Beispiel #7
0
def encode_request(name, txn_id, thread_id):
    buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE, _REQUEST_MESSAGE_TYPE)
    FixSizedTypesCodec.encode_uuid(buf, _REQUEST_TXN_ID_OFFSET, txn_id)
    FixSizedTypesCodec.encode_long(buf, _REQUEST_THREAD_ID_OFFSET, thread_id)
    StringCodec.encode(buf, name, True)
    return OutboundMessage(buf, False)
Beispiel #8
0
def encode_request(name, data_list):
    buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE,
                                _REQUEST_MESSAGE_TYPE)
    StringCodec.encode(buf, name)
    ListMultiFrameCodec.encode(buf, data_list, DataCodec.encode, True)
    return OutboundMessage(buf, False)
Beispiel #9
0
def encode_request(name, entry_processor, predicate):
    buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE, _REQUEST_MESSAGE_TYPE)
    StringCodec.encode(buf, name)
    DataCodec.encode(buf, entry_processor)
    DataCodec.encode(buf, predicate, True)
    return OutboundMessage(buf, False)
def encode_request(local_only):
    buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE, _REQUEST_MESSAGE_TYPE, True)
    FixSizedTypesCodec.encode_boolean(buf, _REQUEST_LOCAL_ONLY_OFFSET, local_only)
    return OutboundMessage(buf, False)
Beispiel #11
0
def encode_request(name, max_size):
    buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE,
                                _REQUEST_MESSAGE_TYPE)
    FixSizedTypesCodec.encode_int(buf, _REQUEST_MAX_SIZE_OFFSET, max_size)
    StringCodec.encode(buf, name, True)
    return OutboundMessage(buf, False)
Beispiel #12
0
def encode_request(group_id, session_id):
    buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE,
                                _REQUEST_MESSAGE_TYPE)
    FixSizedTypesCodec.encode_long(buf, _REQUEST_SESSION_ID_OFFSET, session_id)
    RaftGroupIdCodec.encode(buf, group_id, True)
    return OutboundMessage(buf, True)
Beispiel #13
0
def encode_request(name, predicate):
    buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE,
                                _REQUEST_MESSAGE_TYPE)
    StringCodec.encode(buf, name)
    PagingPredicateHolderCodec.encode(buf, predicate, True)
    return OutboundMessage(buf, True)
def encode_request(group_id, endpoint_name):
    buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE,
                                _REQUEST_MESSAGE_TYPE)
    RaftGroupIdCodec.encode(buf, group_id)
    StringCodec.encode(buf, endpoint_name, True)
    return OutboundMessage(buf, True)
Beispiel #15
0
def encode_request(schemas):
    buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE,
                                _REQUEST_MESSAGE_TYPE)
    ListMultiFrameCodec.encode(buf, schemas, SchemaCodec.encode, True)
    return OutboundMessage(buf, True)
def encode_request(name, registration_id):
    buf = create_initial_buffer(_REQUEST_INITIAL_FRAME_SIZE, _REQUEST_MESSAGE_TYPE)
    FixSizedTypesCodec.encode_uuid(buf, _REQUEST_REGISTRATION_ID_OFFSET, registration_id)
    StringCodec.encode(buf, name, True)
    return OutboundMessage(buf, True)