@Test public void assertSerializeScriptJob() { TaskInfoData actual = new TaskInfoData(shardingContexts, CloudJobConfigurationBuilder.createScriptCloudJobConfiguration("test_job").toCloudJobConfiguration()); assertSerialize(SerializationUtils.deserialize(actual.serialize())); }
public byte[] serialize() { Map<String, Object> result = new LinkedHashMap<>(2, 1); result.put("shardingContext", shardingContexts); result.put("jobConfigContext", YamlEngine.marshal(JobConfigurationPOJO.fromJobConfiguration(cloudJobConfig.getJobConfig()))); return SerializationUtils.serialize((LinkedHashMap) result); }
TaskInfoData { public byte[] serialize() { Map<String, Object> result = new LinkedHashMap<>(2, 1); result.put("shardingContext", shardingContexts); result.put("jobConfigContext", YamlEngine.marshal(JobConfigurationPOJO.fromJobConfiguration(cloudJobConfig.getJobConfig()))); return SerializationUtils.serialize((LinkedHashMap) result); } }
TaskInfoData { public byte[] serialize() { Map<String, Object> result = new LinkedHashMap<>(2, 1); result.put("shardingContext", shardingContexts); result.put("jobConfigContext", YamlEngine.marshal(JobConfigurationPOJO.fromJobConfiguration(cloudJobConfig.getJobConfig()))); return SerializationUtils.serialize((LinkedHashMap) result); }  }
TaskInfoData { public byte[] serialize() { Map<String, Object> result = new LinkedHashMap<>(2, 1); result.put("shardingContext", shardingContexts); result.put("jobConfigContext", YamlEngine.marshal(JobConfigurationPOJO.fromJobConfiguration(cloudJobConfig.getJobConfig()))); return SerializationUtils.serialize((LinkedHashMap) result); }  byte[] serialize(); }
TaskInfoData { public byte[] serialize() { Map<String, Object> result = new LinkedHashMap<>(2, 1); result.put("shardingContext", shardingContexts); result.put("jobConfigContext", YamlEngine.marshal(JobConfigurationPOJO.fromJobConfiguration(cloudJobConfig.getJobConfig()))); return SerializationUtils.serialize((LinkedHashMap) result); }  byte[] serialize();  }