use of io.dingodb.server.protocol.proto.TableEntry in project dingo by dingodb.
the class MetaServiceClient method onTableMessage.
private void onTableMessage(Message message, Channel channel) {
try {
TableEntry tableEntry = readTableEntry(ByteBuffer.wrap(message.toBytes()));
tableEntries.put(tableEntry.tableName(), tableEntry);
} catch (IOException e) {
return;
}
}
use of io.dingodb.server.protocol.proto.TableEntry in project dingo by dingodb.
the class MetaServiceClient method getTableEntry.
private TableEntry getTableEntry(String name) {
TableEntry tableEntry = RemoteServerCaller.call(connector::newChannel, GET_TABLE.message(META_SERVICE, encodeString(name)), this::readTableEntry);
tableEntries.put(tableEntry.tableName(), tableEntry);
return tableEntry;
}
use of io.dingodb.server.protocol.proto.TableEntry in project dingo by dingodb.
the class MetaServiceClient method getAll.
private Map<String, TableDefinition> getAll() {
return RemoteServerCaller.call(connector::newChannel, GET_ALL.message(META_SERVICE), buffer -> {
int size = PrimitiveCodec.readZigZagInt(buffer);
Map<String, TableDefinition> result = new HashMap<>(size);
for (int i = 0; i < size; i++) {
TableEntry entry = readTableEntry(buffer);
tableEntries.put(entry.tableName(), entry);
result.put(entry.tableName(), entry.tableDefinition());
}
return result;
});
}
Aggregations