Package io.fabric8.jenkins.openshiftsync
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 -
Method Summary
Modifier and TypeMethodDescriptionintnow 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 keyvoidonAdd(io.fabric8.openshift.api.model.Build obj) voidonDelete(io.fabric8.openshift.api.model.Build obj, boolean deletedFinalStateUnknown) voidonUpdate(io.fabric8.openshift.api.model.Build oldObj, io.fabric8.openshift.api.model.Build newObj) voidstart()voidstop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.fabric8.kubernetes.client.informers.ResourceEventHandler
onNothing
-
Constructor Details
-
BuildClusterInformer
-
-
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:
startin interfaceLifecyclable
-
stop
public void stop()- Specified by:
stopin interfaceLifecyclable
-
onAdd
public void onAdd(io.fabric8.openshift.api.model.Build obj) - Specified by:
onAddin interfaceio.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:
onUpdatein interfaceio.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:
onDeletein interfaceio.fabric8.kubernetes.client.informers.ResourceEventHandler<io.fabric8.openshift.api.model.Build>
-