operator/src/main/java/oracle/kubernetes/operator/DomainProcessorImpl.java
public void dispatchServiceWatch(Watch.Response<V1Service> item) {
    V1Service service = item.object;
    String domainUid = ServiceHelper.getServiceDomainUid(service);
    if (domainUid == null) {
      return;
    }

    DomainPresenceInfo info =
        getExistingDomainPresenceInfo(service.getMetadata().getNamespace(), domainUid);
    if (info == null) {
      return;
    }

    switch (item.type) {
      case "ADDED":
      case "MODIFIED":
        ServiceHelper.updatePresenceFromEvent(info, item.object);
        break;
      case "DELETED":
        boolean removed = ServiceHelper.deleteFromEvent(info, item.object);
        if (removed && info.isNotDeleting()) {
          createMakeRightOperation(info).interrupt().withExplicitRecheck().execute();
        }
        break;
      default:
    }
  }
/**
   * Dispatch service watch event.
   * @param item watch event
   */
Dispatch service watch event.
@param item watch event
Dispatch service watch event . @param item watch event
public void dispatchServiceWatch(Watch.Response<V1Service> item) {
    V1Service service = item.object;
    String domainUid = ServiceHelper.getServiceDomainUid(service);
    if (domainUid == null) {
      return;
    }
    DomainPresenceInfo info =
        getExistingDomainPresenceInfo(service.getMetadata().getNamespace(), domainUid);
    if (info == null) {
      return;
    }
    switch (item.type) {
      case "ADDED":
      case "MODIFIED":
        ServiceHelper.updatePresenceFromEvent(info, item.object);
        break;
      case "DELETED":
        boolean removed = ServiceHelper.deleteFromEvent(info, item.object);
        if (removed && info.isNotDeleting()) {
          createMakeRightOperation(info).interrupt().withExplicitRecheck().execute();
        }
        break;
      default:
    }
  }
public void dispatchServiceWatch ( Watch . Response < V1Service > item ) { V1Service service = item . object ; String domainUid = ServiceHelper . getServiceDomainUid ( service ) ; if ( domainUid == null ) { return ; } DomainPresenceInfo info = getExistingDomainPresenceInfo ( service . getMetadata ( ) . getNamespace ( ) , domainUid ) ; if ( info == null ) { return ; } switch ( item . type ) { case "ADDED" : case "MODIFIED" : ServiceHelper . updatePresenceFromEvent ( info , item . object ) ; break ; case "DELETED" : boolean removed = ServiceHelper . deleteFromEvent ( info , item . object ) ; if ( removed && info . isNotDeleting ( ) ) { createMakeRightOperation ( info ) . interrupt ( ) . withExplicitRecheck ( ) . execute ( ) ; } break ; default : } }
Dispatch service watch event.
Dispatch service watch event .