void initPostCreateRegionMembershipListeners(Set initialMembers){
  DistributedMember[] initMbrs=null;
  CacheListener[] newcl=null;
synchronized (clSync) {
    for (int i=0; i < cacheListeners.length; i++) {
      CacheListener cl=cacheListeners[i];
      if (cl instanceof WrappedRegionMembershipListener) {
        WrappedRegionMembershipListener wrml=(WrappedRegionMembershipListener)cl;
        if (!wrml.isInitialized()) {
          if (initMbrs == null) {
            initMbrs=(DistributedMember[])initialMembers.toArray(new DistributedMember[initialMembers.size()]);
          }
          wrml.initialMembers(this,initMbrs);
          if (newcl == null) {
            newcl=new CacheListener[cacheListeners.length];
            System.arraycopy(cacheListeners,0,newcl,0,newcl.length);
          }
          newcl[i]=wrml.getWrappedListener();
        }
      }
    }
    if (newcl != null) {
      cacheListeners=newcl;
    }
  }
}

void initPostCreateRegionMembershipListeners ( Set initialMembers ) { DistributedMember [ ] initMbrs = null ; CacheListener [ ] newcl = null ; synchronized ( clSync ) { for ( int i = 0 ; i < cacheListeners . length ; i ++ ) { CacheListener cl = cacheListeners [ i ] ; if ( cl instanceof WrappedRegionMembershipListener ) { WrappedRegionMembershipListener wrml = ( WrappedRegionMembershipListener ) cl ; if ( ! wrml . isInitialized ( ) ) { if ( initMbrs == null ) { initMbrs = ( DistributedMember [ ] ) initialMembers . toArray ( new DistributedMember [ initialMembers . size ( ) ] ) ; } wrml . initialMembers ( this , initMbrs ) ; if ( newcl == null ) { newcl = new CacheListener [ cacheListeners . length ] ; System . arraycopy ( cacheListeners , 0 , newcl , 0 , newcl . length ) ; } newcl [ i ] = wrml . getWrappedListener ( ) ; } } } if ( newcl != null ) { cacheListeners = newcl ; } } }
initialize any wrapped regionmembershiplisteners in the cache listener list
