private static BinaryLatch InjectWarmupLatch( ClusterMember member, AtomicLong pagesLoadedInWarmup ) { BinaryLatch warmupLatch = new BinaryLatch(); Monitors monitors = member.monitors(); monitors.AddMonitorListener( new PageCacheWarmerMonitorAdapterAnonymousInnerClass( pagesLoadedInWarmup, warmupLatch ) ); return warmupLatch; }