/** * <p> * Represents the progress of an online resharding operation. * </p> * * @param slotMigration * Represents the progress of an online resharding operation. * @return Returns a reference to this object so that method calls can be chained together. */ public ReshardingStatus withSlotMigration(SlotMigration slotMigration) { setSlotMigration(slotMigration); return this; }
public ReshardingStatus unmarshall(StaxUnmarshallerContext context) throws Exception { ReshardingStatus reshardingStatus = new ReshardingStatus(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return reshardingStatus; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("SlotMigration", targetDepth)) { reshardingStatus.setSlotMigration(SlotMigrationStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return reshardingStatus; } } } }
/** * <p> * Represents the progress of an online resharding operation. * </p> * * @param slotMigration * Represents the progress of an online resharding operation. * @return Returns a reference to this object so that method calls can be chained together. */ public ReshardingStatus withSlotMigration(SlotMigration slotMigration) { setSlotMigration(slotMigration); return this; }
public ReshardingStatus unmarshall(StaxUnmarshallerContext context) throws Exception { ReshardingStatus reshardingStatus = new ReshardingStatus(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return reshardingStatus; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("SlotMigration", targetDepth)) { reshardingStatus.setSlotMigration(SlotMigrationStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return reshardingStatus; } } } }