No, I do not believe that there is a way to have CPLEX call your callback only when X is integer and Y is not. If you use a user cut callback (as opposed to a lazy constraint callback), you can check your conditions for suitability (X integer, Y not integer) at the start of the callback function and, if not met, exit the callback without doing anything. This will obviously create some "drag" on the solver, since your integrality check will be done at every node. If you adopt this approach with legacy callbacks, also note that user cuts are not supposed to cut off integer-feasible solutions. If your cuts do that, you can get away with putting them in a user cut callback by also attaching an empty lazy constraint callback. Even though the lazy constraint callback does nothing, CPLEX will see it and make the necessary modifications (turn off dynamic search and some dual stuff) to allow it to work with cuts that do cut off integer-feasible solutions.
------------------------------
Paul Rubin
Professor Emeritus
Michigan State University
------------------------------