LOG.warn("Failed pending assignment for: " + name);
return assignment;
}
}
final Deferred d;
switch (state) {
case ALLOCATE_UID:
d = allocateUid();
break;
case CREATE_REVERSE_MAPPING:
d = createReverseMapping(arg);
break;
case CREATE_FORWARD_MAPPING:
d = createForwardMapping(arg);
break;
case DONE:
return done(arg);
default:
throw new AssertionError("Should never be here!");
}
return d.addBoth(this).addErrback(new ErrBack());
}