Ejemplo n.º 1
0
 @Override
 public void writeToFile(LogBuffer buffer) throws IOException {
   writeHeader(buffer);
   buffer.putShort((short) config.size());
   for (Map.Entry<String, String> entry : config.entrySet()) {
     write2bLengthAndString(buffer, entry.getKey());
     write2bLengthAndString(buffer, entry.getValue());
   }
 }
Ejemplo n.º 2
0
 @Override
 public boolean visitIndexCreateCommand(CreateCommand command) throws IOException {
   channel.put(NeoCommandType.INDEX_CREATE_COMMAND);
   writeIndexCommandHeader(command);
   channel.putShort((short) command.getConfig().size());
   for (Map.Entry<String, String> entry : command.getConfig().entrySet()) {
     write2bLengthAndString(channel, entry.getKey());
     write2bLengthAndString(channel, entry.getValue());
   }
   return false;
 }
Ejemplo n.º 3
0
 private void writeMap(Map<String, Integer> map) throws IOException {
   channel.put((byte) map.size());
   for (Map.Entry<String, Integer> entry : map.entrySet()) {
     write2bLengthAndString(channel, entry.getKey());
     int id = entry.getValue();
     channel.putShort((short) id);
   }
 }