Class BuildClusterInformer

java.lang.Object
io.fabric8.jenkins.openshiftsync.BuildClusterInformer
All Implemented Interfaces:
Lifecyclable, io.fabric8.kubernetes.client.informers.ResourceEventHandler<io.fabric8.openshift.api.model.Build>

public class BuildClusterInformer extends Object implements io.fabric8.kubernetes.client.informers.ResourceEventHandler<io.fabric8.openshift.api.model.Build>, Lifecyclable
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    now that listing interval is 5 minutes (used to be 10 seconds), we have seen timing windows where if the build watch events come before build config watch events when both are created in a simultaneous fashion, there is an up to 5 minutes delay before the job run gets kicked off started seeing duplicate builds getting kicked off so quit depending on so moved off of concurrent hash set to concurrent hash map using namepace/name key
    void
    onAdd(io.fabric8.openshift.api.model.Build obj)
     
    void
    onDelete(io.fabric8.openshift.api.model.Build obj, boolean deletedFinalStateUnknown)
     
    void
    onUpdate(io.fabric8.openshift.api.model.Build oldObj, io.fabric8.openshift.api.model.Build newObj)
     
    void
     
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.fabric8.kubernetes.client.informers.ResourceEventHandler

    onNothing
  • Constructor Details

    • BuildClusterInformer

      public BuildClusterInformer(String[] namespaces)
  • Method Details

    • getListIntervalInSeconds

      public int getListIntervalInSeconds()
      now that listing interval is 5 minutes (used to be 10 seconds), we have seen timing windows where if the build watch events come before build config watch events when both are created in a simultaneous fashion, there is an up to 5 minutes delay before the job run gets kicked off started seeing duplicate builds getting kicked off so quit depending on so moved off of concurrent hash set to concurrent hash map using namepace/name key
    • start

      public void start()
      Specified by:
      start in interface Lifecyclable
    • stop

      public void stop()
      Specified by:
      stop in interface Lifecyclable
    • onAdd

      public void onAdd(io.fabric8.openshift.api.model.Build obj)
      Specified by:
      onAdd in interface io.fabric8.kubernetes.client.informers.ResourceEventHandler<io.fabric8.openshift.api.model.Build>
    • onUpdate

      public void onUpdate(io.fabric8.openshift.api.model.Build oldObj, io.fabric8.openshift.api.model.Build newObj)
      Specified by:
      onUpdate in interface io.fabric8.kubernetes.client.informers.ResourceEventHandler<io.fabric8.openshift.api.model.Build>
    • onDelete

      public void onDelete(io.fabric8.openshift.api.model.Build obj, boolean deletedFinalStateUnknown)
      Specified by:
      onDelete in interface io.fabric8.kubernetes.client.informers.ResourceEventHandler<io.fabric8.openshift.api.model.Build>