private static boolean compareAndSwapPartitionState(int partitionId, JobPartitionState oldPartitionState,
JobProcessInformationImpl processInformation, Address owner,
JobPartitionState.State newState) {
JobPartitionState newPartitionState = new JobPartitionStateImpl(owner, newState);
if (processInformation.updatePartitionState(partitionId, oldPartitionState, newPartitionState)) {
return true;
}
return false;
}