Package io.fabric8.jenkins.openshiftsync
Class BuildInformer
- java.lang.Object
-
- io.fabric8.jenkins.openshiftsync.BuildInformer
-
- All Implemented Interfaces:
Lifecyclable
,io.fabric8.kubernetes.client.informers.ResourceEventHandler<io.fabric8.openshift.api.model.Build>
public class BuildInformer extends Object implements io.fabric8.kubernetes.client.informers.ResourceEventHandler<io.fabric8.openshift.api.model.Build>, Lifecyclable
-
-
Constructor Summary
Constructors Constructor Description BuildInformer(String namespace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getResyncPeriodMilliseconds()
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()
-
-
-
Constructor Detail
-
BuildInformer
public BuildInformer(String namespace)
-
-
Method Detail
-
getResyncPeriodMilliseconds
public int getResyncPeriodMilliseconds()
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>
-
-