We consider a queuing model with the workload evolving between consecutive i.i.d. exponential timers $\{e_q^{(i)}\}_{i=1,2,\ldots}$ according to a spectrally positive Lévy process $Y_i(t)$ that is reflected at zero, and where the environment $i$ equals 0 or 1. When the exponential clock $e_q^{(i)}$ ends, the workload, as well as the Lévy input process, are modified; this modification may depend on the current value of the workload, the maximum and the minimum workload observed during the previous cycle, and the environment i of the Lévy input process itself during the previous cycle. We analyse the steady-state workload distribution for this model. The main theme of the analysis is the systematic application of non-trivial functionals, deri...