public static long parseResourceVersion ( HasMetadata obj ) { ObjectMeta metadata = obj . getMetadata ( ) ; if ( metadata != null ) { String resourceVersion = metadata . getResourceVersion ( ) ; if ( notEmpty ( resourceVersion ) ) { try { return Long . parseLong ( resourceVersion ) ; } catch ( NumberFormatException e ) { // ignore } } } return 0 ; }
Returns the numeric resource version of the resource