/** * Creates a new allocation id for initializing allocation based on an existing id. */ public static AllocationId newInitializing(String existingAllocationId) { return new AllocationId(existingAllocationId, null); }
public AllocationId build() { return new AllocationId(id, relocationId); } }
/** * Creates a new allocation id for initializing allocation. */ public static AllocationId newInitializing() { return new AllocationId(UUIDs.randomBase64UUID(), null); }
/** * Creates a new allocation id representing a cancelled relocation. * <p> * Note that this is expected to be called on the allocation id * of the *source* shard */ public static AllocationId cancelRelocation(AllocationId allocationId) { assert allocationId.getRelocationId() != null; return new AllocationId(allocationId.getId(), null); }
/** * Creates a new allocation id finalizing a relocation. * <p> * Note that this is expected to be called on the allocation id * of the *target* shard and thus it only needs to clear the relocating id. */ public static AllocationId finishRelocation(AllocationId allocationId) { assert allocationId.getRelocationId() != null; return new AllocationId(allocationId.getId(), null); }
/** * Creates a new allocation id for the target initializing shard that is the result * of a relocation. */ public static AllocationId newTargetRelocation(AllocationId allocationId) { assert allocationId.getRelocationId() != null; return new AllocationId(allocationId.getRelocationId(), allocationId.getId()); }
/** * Creates a new allocation id for a shard that moves to be relocated, populating * the transient holder for relocationId. */ public static AllocationId newRelocation(AllocationId allocationId) { assert allocationId.getRelocationId() == null; return new AllocationId(allocationId.getId(), UUIDs.randomBase64UUID()); }
/** * Creates a new allocation id for initializing allocation based on an existing id. */ public static AllocationId newInitializing(String existingAllocationId) { return new AllocationId(existingAllocationId, null); }
/** * Creates a new allocation id for initializing allocation based on an existing id. */ public static AllocationId newInitializing(String existingAllocationId) { return new AllocationId(existingAllocationId, null); }
/** * Creates a new allocation id for initializing allocation based on an existing id. */ public static AllocationId newInitializing(String existingAllocationId) { return new AllocationId(existingAllocationId, null); }
/** * Creates a new allocation id for initializing allocation. */ public static AllocationId newInitializing() { return new AllocationId(UUIDs.randomBase64UUID(), null); }
/** * Creates a new allocation id for initializing allocation. */ public static AllocationId newInitializing() { return new AllocationId(UUIDs.randomBase64UUID(), null); }
/** * Creates a new allocation id for initializing allocation. */ public static AllocationId newInitializing() { return new AllocationId(Strings.randomBase64UUID(), null); }
/** * Creates a new allocation id representing a cancelled relocation. * <p> * Note that this is expected to be called on the allocation id * of the *source* shard */ public static AllocationId cancelRelocation(AllocationId allocationId) { assert allocationId.getRelocationId() != null; return new AllocationId(allocationId.getId(), null); }
/** * Creates a new allocation id finalizing a relocation. * <p> * Note that this is expected to be called on the allocation id * of the *target* shard and thus it only needs to clear the relocating id. */ public static AllocationId finishRelocation(AllocationId allocationId) { assert allocationId.getRelocationId() != null; return new AllocationId(allocationId.getId(), null); }
/** * Creates a new allocation id for a shard that moves to be relocated, populating * the transient holder for relocationId. */ public static AllocationId newRelocation(AllocationId allocationId) { assert allocationId.getRelocationId() == null; return new AllocationId(allocationId.getId(), UUIDs.randomBase64UUID()); }
/** * Creates a new allocation id for the target initializing shard that is the result * of a relocation. */ public static AllocationId newTargetRelocation(AllocationId allocationId) { assert allocationId.getRelocationId() != null; return new AllocationId(allocationId.getRelocationId(), allocationId.getId()); }
/** * Creates a new allocation id for a shard that moves to be relocated, populating * the transient holder for relocationId. */ public static AllocationId newRelocation(AllocationId allocationId) { assert allocationId.getRelocationId() == null; return new AllocationId(allocationId.getId(), UUIDs.randomBase64UUID()); }
/** * Creates a new allocation id for the target initializing shard that is the result * of a relocation. */ public static AllocationId newTargetRelocation(AllocationId allocationId) { assert allocationId.getRelocationId() != null; return new AllocationId(allocationId.getRelocationId(), allocationId.getId()); }
/** * Creates a new allocation id for a shard that moves to be relocated, populating * the transient holder for relocationId. */ public static AllocationId newRelocation(AllocationId allocationId) { assert allocationId.getRelocationId() == null; return new AllocationId(allocationId.getId(), Strings.randomBase64UUID()); }