Commit e1aeaa39 authored by yannick legoc's avatar yannick legoc

Added GetWholeDynamicProperties request to get the alias of dynamic properties

parent d6764c72
......@@ -796,7 +796,7 @@ public class DataAccessor {
.build();
// Create the request.
DatabaseRequest.GetWholeScannablePropertiesRequest request = DatabaseRequest.GetWholeScannablePropertiesRequest.newBuilder()
DatabaseRequest.GetWholePropertiesRequest request = DatabaseRequest.GetWholePropertiesRequest.newBuilder()
.setDatabaseID(databaseID)
.build();
......@@ -814,6 +814,32 @@ public class DataAccessor {
return "";
}
public String getWholeDynamicProperties(int databaseID) {
// Create the message type.
DatabaseRequest.Message type = DatabaseRequest.Message.newBuilder()
.setType(DatabaseRequest.Message.Type.GetWholeDynamicProperties)
.build();
// Create the request.
DatabaseRequest.GetWholePropertiesRequest request = DatabaseRequest.GetWholePropertiesRequest.newBuilder()
.setDatabaseID(databaseID)
.build();
databaseRequester.sendTwoParts(type.toByteArray(), request.toByteArray());
try {
Common.StringResponse response = Common.StringResponse.parseFrom(databaseRequester.receive());
return response.getValue();
}
catch (InvalidProtocolBufferException e) {
LOGGER.logp(Level.WARNING, this.getClass().getName(), "getWholeDynamicProperties", "error in parsing response");
}
return "";
}
public static String getServerId(int databaseId) {
if (databaseId == 0) {
return CommandZoneWrapper.SERVER_ID;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment