in hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/task/HugeTask.java [450:504]
protected void property(String key, Object value) {
E.checkNotNull(key, "property key");
switch (key) {
case P.TYPE:
this.type = (String) value;
break;
case P.NAME:
this.name = (String) value;
break;
case P.CALLABLE:
// pass
break;
case P.STATUS:
this.status = SerialEnum.fromCode(TaskStatus.class,
(byte) value);
break;
case P.PROGRESS:
this.progress = (int) value;
break;
case P.CREATE:
this.create = (Date) value;
break;
case P.RETRIES:
this.retries = (int) value;
break;
case P.DESCRIPTION:
this.description = (String) value;
break;
case P.CONTEXT:
this.context = (String) value;
break;
case P.UPDATE:
this.update = (Date) value;
break;
case P.DEPENDENCIES:
@SuppressWarnings("unchecked")
Set<Long> values = (Set<Long>) value;
this.dependencies = values.stream().map(IdGenerator::of)
.collect(toOrderSet());
break;
case P.INPUT:
this.input = StringEncoding.decompress(((Blob) value).bytes(),
DECOMPRESS_RATIO);
break;
case P.RESULT:
this.result = StringEncoding.decompress(((Blob) value).bytes(),
DECOMPRESS_RATIO);
break;
case P.SERVER:
this.server = IdGenerator.of((String) value);
break;
default:
throw new AssertionError("Unsupported key: " + key);
}
}