test_class.declarator: resumeBreakPointManager
test_class.modifier: private
test_class.original_string: private AbstractResumeBreakPointManager resumeBreakPointManager;
test_class.type: AbstractResumeBreakPointManager
test_class.var_name: resumeBreakPointManager
test_class.declarator: incrementalPosition = "{\"ds0\":{},\"ds1\":{}}"
test_class.modifier: private final
test_class.original_string: private final String incrementalPosition = "{\"ds0\":{},\"ds1\":{}}";
test_class.type: String
test_class.var_name: incrementalPosition
test_class.declarator: inventoryPosition = "{\"unfinished\":{\"ds0.t_order_1#0\":[0,100],\"ds0.t_order_2\":[],\"ds1.t_order_1#0\":[0,200]},\"finished\":[\"ds0.t_order_1#1\"]}"
test_class.modifier: private final
test_class.original_string: private final String inventoryPosition = "{\"unfinished\":{\"ds0.t_order_1#0\":[0,100],\"ds0.t_order_2\":[],\"ds1.t_order_1#0\":[0,200]},\"finished\":[\"ds0.t_order_1#1\"]}";
test_class.type: String
test_class.var_name: inventoryPosition
test_class.file: shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/job/position/resume/AbstractResumeBreakPointManagerTest.java
test_class.identifier: AbstractResumeBreakPointManagerTest
test_case.body: @Test
      public void assertFinishedPositionJson() {
          resumeBreakPointManager.getInventoryPositionManagerMap().put("ds0.t_order_1#0", new InventoryPositionManager<>(new FinishedInventoryPosition()));
          assertThat(resumeBreakPointManager.getInventoryPositionData(), is("{\"unfinished\":{},\"finished\":[\"ds0.t_order_1#0\"]}"));
          assertThat(new FinishedInventoryPosition().toJson().toString(), is("{}"));
      }
test_case.class_method_signature: AbstractResumeBreakPointManagerTest.assertFinishedPositionJson()
test_case.full_signature: @Test public void assertFinishedPositionJson()
test_case.identifier: assertFinishedPositionJson
test_case.invocations: put getInventoryPositionManagerMap assertThat getInventoryPositionData is assertThat toString toJson is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertFinishedPositionJson()
focal_class.declarator: GSON = new Gson()
focal_class.modifier: private static final
focal_class.original_string: private static final Gson GSON = new Gson();
focal_class.type: Gson
focal_class.var_name: GSON
focal_class.declarator: UNFINISHED = "unfinished"
focal_class.modifier: private static final
focal_class.original_string: private static final String UNFINISHED = "unfinished";
focal_class.type: String
focal_class.var_name: UNFINISHED
focal_class.declarator: FINISHED = "finished"
focal_class.modifier: private static final
focal_class.original_string: private static final String FINISHED = "finished";
focal_class.type: String
focal_class.var_name: FINISHED
focal_class.declarator: inventoryPositionManagerMap = Maps.newConcurrentMap()
focal_class.modifier: private final
focal_class.original_string: private final Map<String, PositionManager<InventoryPosition>> inventoryPositionManagerMap = Maps.newConcurrentMap();
focal_class.type: Map<String, PositionManager<InventoryPosition>>
focal_class.var_name: inventoryPositionManagerMap
focal_class.declarator: incrementalPositionManagerMap = Maps.newConcurrentMap()
focal_class.modifier: private final
focal_class.original_string: private final Map<String, PositionManager<IncrementalPosition>> incrementalPositionManagerMap = Maps.newConcurrentMap();
focal_class.type: Map<String, PositionManager<IncrementalPosition>>
focal_class.var_name: incrementalPositionManagerMap
focal_class.declarator: resumable
focal_class.modifier: private
focal_class.original_string: private boolean resumable;
focal_class.type: boolean
focal_class.var_name: resumable
focal_class.declarator: databaseType
focal_class.modifier: private
focal_class.original_string: private String databaseType;
focal_class.type: String
focal_class.var_name: databaseType
focal_class.declarator: taskPath
focal_class.modifier: private
focal_class.original_string: private String taskPath;
focal_class.type: String
focal_class.var_name: taskPath
focal_class.file: shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/job/position/resume/AbstractResumeBreakPointManager.java
focal_class.identifier: AbstractResumeBreakPointManager
focal_class.interfaces: implements ResumeBreakPointManager, Closeable
focal_class.class_method_signature: AbstractResumeBreakPointManager.resumeInventoryPosition(final String data)
focal_class.full_signature: protected final void resumeInventoryPosition(final String data)
focal_class.identifier: resumeInventoryPosition
focal_class.modifiers: protected final
focal_class.parameters: (final String data)
focal_class.return: void
focal_class.signature: void resumeInventoryPosition(final String data)
focal_class.class_method_signature: AbstractResumeBreakPointManager.resumeIncrementalPosition(final String data)
focal_class.full_signature: protected final void resumeIncrementalPosition(final String data)
focal_class.identifier: resumeIncrementalPosition
focal_class.modifiers: protected final
focal_class.parameters: (final String data)
focal_class.return: void
focal_class.signature: void resumeIncrementalPosition(final String data)
focal_class.class_method_signature: AbstractResumeBreakPointManager.getInventoryPositionData()
focal_class.full_signature: protected final String getInventoryPositionData()
focal_class.identifier: getInventoryPositionData
focal_class.modifiers: protected final
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getInventoryPositionData()
focal_class.class_method_signature: AbstractResumeBreakPointManager.getIncrementalPositionData()
focal_class.full_signature: protected final String getIncrementalPositionData()
focal_class.identifier: getIncrementalPositionData
focal_class.modifiers: protected final
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getIncrementalPositionData()
focal_class.class_method_signature: AbstractResumeBreakPointManager.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_method.body: protected final String getInventoryPositionData() {
          JsonObject result = new JsonObject();
          JsonObject unfinished = new JsonObject();
          Set<String> finished = Sets.newHashSet();
          for (Entry<String, PositionManager<InventoryPosition>> entry : inventoryPositionManagerMap.entrySet()) {
              if (entry.getValue().getPosition() instanceof FinishedInventoryPosition) {
                  finished.add(entry.getKey());
                  continue;
              }
              unfinished.add(entry.getKey(), entry.getValue().getPosition().toJson());
          }
          result.add(UNFINISHED, unfinished);
          result.add(FINISHED, GSON.toJsonTree(finished));
          return result.toString();
      }
focal_method.class_method_signature: AbstractResumeBreakPointManager.getInventoryPositionData()
focal_method.full_signature: protected final String getInventoryPositionData()
focal_method.identifier: getInventoryPositionData
focal_method.invocations: newHashSet entrySet getPosition getValue add getKey add getKey toJson getPosition getValue add add toJsonTree toString
focal_method.modifiers: protected final
focal_method.parameters: ()
focal_method.return: String
focal_method.signature: String getInventoryPositionData()