use of org.glassfish.api.admin.progress.ProgressStatusMirroringImpl in project Payara by payara.
the class CommandProgressImpl method createMirroringChild.
@Override
public synchronized ProgressStatusMirroringImpl createMirroringChild(int allocatedSteps) {
allocateStapsForChildProcess(allocatedSteps);
String childId = (id == null ? "" : id) + "." + (children.size() + 1);
ProgressStatusMirroringImpl result = new ProgressStatusMirroringImpl(null, this, childId);
children.add(new ChildProgressStatus(allocatedSteps, result));
fireEvent(new ProgressStatusEventCreateChild(id, null, result.getId(), allocatedSteps, -1));
return result;
}
use of org.glassfish.api.admin.progress.ProgressStatusMirroringImpl in project Payara by payara.
the class CommandProgressImplTest method testCreateMirroringChild.
// @BeforeClass
// public static void setUpClass() throws Exception {
// }
//
// @AfterClass
// public static void tearDownClass() throws Exception {
// }
@Test
public void testCreateMirroringChild() {
CommandProgressImpl cp = new CommandProgressImpl("first", "a");
cp.setTotalStepCount(2);
ProgressStatusMirroringImpl ch1 = cp.createMirroringChild(1);
assertNotNull(ch1);
ProgressStatus ch2 = cp.createChild(1);
assertNotNull(ch1);
assertTrue(ch2 instanceof ProgressStatusImpl);
}
Aggregations