/**
* If the current dialect supports batching, register the required event listeners.
*/
private void attachBatchListenersIfRequired(SessionFactoryServiceRegistry serviceRegistry) {
GridDialect gridDialect = serviceRegistry.getService( GridDialect.class );
BatchOperationsDelegator batchDelegator = asBatchDelegatorOrNull( gridDialect );
if ( batchDelegator != null ) {
EventListenerRegistry eventListenerRegistry = serviceRegistry.getService( EventListenerRegistry.class );
addListeners( eventListenerRegistry, batchDelegator );
}