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 TypeMethodDescriptionint
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 keyvoid
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
start()
void
stop()
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
-
-
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 interfaceLifecyclable
-
stop
public void stop()- Specified by:
stop
in interfaceLifecyclable
-
onAdd
public void onAdd(io.fabric8.openshift.api.model.Build obj) - Specified by:
onAdd
in 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:
onUpdate
in 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:
onDelete
in interfaceio.fabric8.kubernetes.client.informers.ResourceEventHandler<io.fabric8.openshift.api.model.Build>
-