node/src/main/java/io/fabric8/jube/local/NodeHelper.java
public static <T> T podTransaction(KubernetesModel model, Pod pod, Callable<T> task) throws Exception {
        String oldJson = getPodJson(pod);
        T answer = task.call();
        String newJson = getPodJson(pod);

        // lets only update the model if we've really changed the pod
        if (!java.util.Objects.equals(oldJson, newJson)) {
            model.updatePod(pod.getId(), pod);
        }
        return answer;
    }
/**
     * Performs a block of code and updates the pod model if its updated
     */
Performs a block of code and updates the pod model if its updated
Performs a block of code and updates the pod model if its updated
public static <T> T podTransaction(KubernetesModel model, Pod pod, Callable<T> task) throws Exception {
        String oldJson = getPodJson(pod);
        T answer = task.call();
        String newJson = getPodJson(pod);
        if (!java.util.Objects.equals(oldJson, newJson)) {
            model.updatePod(pod.getId(), pod);
        }
        return answer;
    }
public static < T > T podTransaction ( KubernetesModel model , Pod pod , Callable < T > task ) throws Exception { String oldJson = getPodJson ( pod ) ; T answer = task . call ( ) ; String newJson = getPodJson ( pod ) ; if ( ! java . util . Objects . equals ( oldJson , newJson ) ) { model . updatePod ( pod . getId ( ) , pod ) ; } return answer ; }
Performs a block of code and updates the pod model if its updated
Performs a block of code and updates the pod model if its updated
// lets only update the model if we've really changed the pod