Synchronously makes initial population of partition UUIDs & sequences.
<p>
This initialization is done for every data structure with a Near Cache.
519730
private void initRepairingHandler(RepairingHandler handler) {
        logger.finest("Initializing repairing handler");

        boolean initialized = false;
        try {
            invalidationMetaDataFetcher.init(handler);
            initialized = true;
        } catch (Exception e) {
            logger.warning(e);
        } finally {
            if (!initialized) {
                initRepairingHandlerAsync(handler);
            }
        }
    }
140641
public static void initialize(final Class<?> _class)
        throws CacheReloadException
    {
        if (InfinispanCache.get().exists(NumberGenerator.UUIDCACHE)) {
            InfinispanCache.get().<UUID, NumberGenerator>getCache(NumberGenerator.UUIDCACHE).clear();
        } else {
            InfinispanCache.get().<UUID, NumberGenerator>getCache(NumberGenerator.UUIDCACHE)
                            .addListener(new CacheLogListener(NumberGenerator.LOG));
        }
        if (InfinispanCache.get().exists(NumberGenerator.IDCACHE)) {
            InfinispanCache.get().<Long, NumberGenerator>getCache(NumberGenerator.IDCACHE).clear();
        } else {
            InfinispanCache.get().<Long, NumberGenerator>getCache(NumberGenerator.IDCACHE)
                            .addListener(new CacheLogListener(NumberGenerator.LOG));
        }
        if (InfinispanCache.get().exists(NumberGenerator.NAMECACHE)) {
            InfinispanCache.get().<String, NumberGenerator>getCache(NumberGenerator.NAMECACHE).clear();
        } else {
            InfinispanCache.get().<String, NumberGenerator>getCache(NumberGenerator.NAMECACHE)
                            .addListener(new CacheLogListener(NumberGenerator.LOG));
        }
    }
438991
private List<KafkaTopicPartitionState<KPH>> createPartitionStateHolders(
			Map<KafkaTopicPartition, Long> partitionsToInitialOffsets,
			int timestampWatermarkMode,
			SerializedValue<AssignerWithPeriodicWatermarks<T>> watermarksPeriodic,
			SerializedValue<AssignerWithPunctuatedWatermarks<T>> watermarksPunctuated,
			ClassLoader userCodeClassLoader) throws IOException, ClassNotFoundException {

		// CopyOnWrite as adding discovered partitions could happen in parallel
		// while different threads iterate the partitions list
		List<KafkaTopicPartitionState<KPH>> partitionStates = new CopyOnWriteArrayList<>();

		switch (timestampWatermarkMode) {
			case NO_TIMESTAMPS_WATERMARKS: {
				for (Map.Entry<KafkaTopicPartition, Long> partitionEntry : partitionsToInitialOffsets.entrySet()) {
					// create the kafka version specific partition handle
					KPH kafkaHandle = createKafkaPartitionHandle(partitionEntry.getKey());

					KafkaTopicPartitionState<KPH> partitionState =
							new KafkaTopicPartitionState<>(partitionEntry.getKey(), kafkaHandle);
					partitionState.setOffset(partitionEntry.getValue());

					partitionStates.add(partitionState);
				}

				return partitionStates;
			}

			case PERIODIC_WATERMARKS: {
				for (Map.Entry<KafkaTopicPartition, Long> partitionEntry : partitionsToInitialOffsets.entrySet()) {
					KPH kafkaHandle = createKafkaPartitionHandle(partitionEntry.getKey());

					AssignerWithPeriodicWatermarks<T> assignerInstance =
							watermarksPeriodic.deserializeValue(userCodeClassLoader);

					KafkaTopicPartitionStateWithPeriodicWatermarks<T, KPH> partitionState =
							new KafkaTopicPartitionStateWithPeriodicWatermarks<>(
									partitionEntry.getKey(),
									kafkaHandle,
									assignerInstance);

					partitionState.setOffset(partitionEntry.getValue());

					partitionStates.add(partitionState);
				}

				return partitionStates;
			}

			case PUNCTUATED_WATERMARKS: {
				for (Map.Entry<KafkaTopicPartition, Long> partitionEntry : partitionsToInitialOffsets.entrySet()) {
					KPH kafkaHandle = createKafkaPartitionHandle(partitionEntry.getKey());

					AssignerWithPunctuatedWatermarks<T> assignerInstance =
							watermarksPunctuated.deserializeValue(userCodeClassLoader);

					KafkaTopicPartitionStateWithPunctuatedWatermarks<T, KPH> partitionState =
							new KafkaTopicPartitionStateWithPunctuatedWatermarks<>(
									partitionEntry.getKey(),
									kafkaHandle,
									assignerInstance);

					partitionState.setOffset(partitionEntry.getValue());

					partitionStates.add(partitionState);
				}

				return partitionStates;
			}
			default:
				// cannot happen, add this as a guard for the future
				throw new RuntimeException();
		}
	}
1319016
public void init(Marshaller marshaller, OperationsFactory operationsFactory,
                    int estimateKeySize, int estimateValueSize, int batchSize) {
      this.defaultMarshaller = marshaller;
      this.operationsFactory = operationsFactory;
      this.estimateKeySize = estimateKeySize;
      this.estimateValueSize = estimateValueSize;
      this.batchSize = batchSize;
      this.dataFormat = defaultDataFormat;
   }
340168
private void startFixture(final String uuid, final FixtureResult result) {
        storage.put(uuid, result);
        result.setStage(Stage.RUNNING);
        result.setStart(System.currentTimeMillis());
        threadContext.clear();
        threadContext.start(uuid);
    }
410864
private final void init(int nbuckets, int initBucketSize) {
    buckets = new Element[nbuckets][];
    counts = new int[nbuckets];
    this.initBucketSize = initBucketSize;
  }
201334
@Inject
   public void preStart() {
      // We have to do this before start, since some components may start before the actual cache and they
      // have to have access to the default metadata on some operations
      defaultMetadata = new EmbeddedMetadata.Builder()
            .lifespan(config.expiration().lifespan()).maxIdle(config.expiration().maxIdle()).build();
      transactional = config.transaction().transactionMode().isTransactional();
      batchingEnabled = config.invocationBatching().enabled();
   }
1081069
private synchronized void initBuckets() {
    final SparseIntArray bucketSizes = mPoolParams.bucketSizes;

    // create the buckets
    if (bucketSizes != null) {
      fillBuckets(bucketSizes);
      mAllowNewBuckets = false;
    } else {
      mAllowNewBuckets = true;
    }
  }
201719
void initializeReplQueues() throws SafeModeException {
    writeLock();
    try {
      if (isPopulatingReplQueues()) {
        NameNode.stateChangeLog.info("STATE* Safe mode is already OFF."
            + " Replication queues are initialized");
        return;
      }
      safeMode.initializeReplicationQueues();
    } finally {
      writeUnlock();
    }
  }
1310771
public static void initialize()
    {
        if (InfinispanCache.get().exists(Group.IDCACHE)) {
            InfinispanCache.get().<Long, Group>getCache(Group.IDCACHE).clear();
        } else {
            InfinispanCache.get().<Long, Group>getCache(Group.IDCACHE).addListener(new CacheLogListener(Group.LOG));
        }
        if (InfinispanCache.get().exists(Group.NAMECACHE)) {
            InfinispanCache.get().<String, Group>getCache(Group.NAMECACHE).clear();
        } else {
            InfinispanCache.get().<String, Group>getCache(Group.NAMECACHE).addListener(new CacheLogListener(Group.LOG));
        }
        if (InfinispanCache.get().exists(Group.UUIDCACHE)) {
            InfinispanCache.get().<UUID, Group>getCache(Group.UUIDCACHE).clear();
        } else {
            InfinispanCache.get().<UUID, Group>getCache(Group.UUIDCACHE).addListener(new CacheLogListener(Group.LOG));
        }
    }
829369
public void startDefinition(){
		sequencer = new Sequencer();
		states = Maps.synchronizedBiMap(HashBiMap.<S, Integer>create());
		transitions = new ConcurrentHashMap<DoubleValueBean<S, T>, Transition<S>>();
		validTransitions = new PutIfAbsentMap<S, Set<T>>(new HashMap<S, Set<T>>(), new MapValueFactory<S, Set<T>>(){
			@Override
			public Set<T> createValue(S key) {
				return Collections.newSetFromMap(new ConcurrentHashMap<T, Boolean>());
			}
		});
	}
913250
public static void initialize()
    {
        if (InfinispanCache.get().exists(MsgPhrase.UUIDCACHE)) {
            InfinispanCache.get().<UUID, MsgPhrase>getCache(MsgPhrase.UUIDCACHE).clear();
        } else {
            InfinispanCache.get().<UUID, MsgPhrase>getCache(MsgPhrase.UUIDCACHE)
                            .addListener(new CacheLogListener(MsgPhrase.LOG));
        }
        if (InfinispanCache.get().exists(MsgPhrase.IDCACHE)) {
            InfinispanCache.get().<Long, MsgPhrase>getCache(MsgPhrase.IDCACHE).clear();
        } else {
            InfinispanCache.get().<Long, MsgPhrase>getCache(MsgPhrase.IDCACHE)
                            .addListener(new CacheLogListener(MsgPhrase.LOG));
        }
        if (InfinispanCache.get().exists(MsgPhrase.NAMECACHE)) {
            InfinispanCache.get().<String, MsgPhrase>getCache(MsgPhrase.NAMECACHE).clear();
        } else {
            InfinispanCache.get().<String, MsgPhrase>getCache(MsgPhrase.NAMECACHE)
                            .addListener(new CacheLogListener(MsgPhrase.LOG));
        }
        if (InfinispanCache.get().exists(MsgPhrase.LABELCACHE)) {
            InfinispanCache.get().getCache(MsgPhrase.LABELCACHE).clear();
        } else {
            InfinispanCache.get().<String, String>getCache(MsgPhrase.LABELCACHE)
                            .addListener(new CacheLogListener(MsgPhrase.LOG));
        }
        if (InfinispanCache.get().exists(MsgPhrase.ARGUMENTCACHE)) {
            InfinispanCache.get().getCache(MsgPhrase.ARGUMENTCACHE).clear();
        } else {
            InfinispanCache.get().<String, List<String>>getCache(MsgPhrase.ARGUMENTCACHE)
                            .addListener(new CacheLogListener(MsgPhrase.LOG));
        }
    }
780377
public static void initialize()
    {
        if (InfinispanCache.get().exists(AccessType.UUIDCACHE)) {
            InfinispanCache.get().<UUID, AccessType>getCache(AccessType.UUIDCACHE).clear();
        } else {
            InfinispanCache.get().<UUID, AccessType>getCache(AccessType.UUIDCACHE)
                            .addListener(new CacheLogListener(AccessType.LOG));
        }
        if (InfinispanCache.get().exists(AccessType.IDCACHE)) {
            InfinispanCache.get().<Long, AccessType>getCache(AccessType.IDCACHE).clear();
        } else {
            InfinispanCache.get().<Long, AccessType>getCache(AccessType.IDCACHE)
                            .addListener(new CacheLogListener(AccessType.LOG));
        }
        if (InfinispanCache.get().exists(AccessType.NAMECACHE)) {
            InfinispanCache.get().<String, AccessType>getCache(AccessType.NAMECACHE).clear();
        } else {
            InfinispanCache.get().<String, AccessType>getCache(AccessType.NAMECACHE)
                            .addListener(new CacheLogListener(AccessType.LOG));
        }
        AccessCache.initialize();
    }
860557
public static void init(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit timeUnit) {
        ThreadPool.corePoolSize = corePoolSize;
        ThreadPool.maximumPoolSize = maximumPoolSize;
        ThreadPool.keepAliveTime = keepAliveTime;
        ThreadPool.timeUnit = timeUnit;
        init();
    }
630062
@PostConstruct
	public void initialize() {
		logger.debug("Initializing " + this.getClass().getSimpleName() + "(" + System.identityHashCode(this) + ")");

		attributesMap = Collections.synchronizedMap(new HashMap<String, Object>());
	}
756883
private void setInitialPartitions(double[][] pointArray, int k) {
		if (pointArray.length < k) {
			System.err.println("cannot cluster less than k points into k clusters...");
			System.exit(0);
		}
		
		// select randomly k initial means
		// TODO: choose more stable initialization (comment: this is run several times (with different random seeds), i.e. the worst case should not occur)
        Random random = new Random(randomSeed);
		TreeSet<Integer> usedPoints = new TreeSet<Integer>();
		int nextIndex;
		for (int i = 0; i < k; i++) {
			nextIndex = ((Double)(Math.floor(random.nextDouble() * n))).intValue();
			if (usedPoints.contains(nextIndex)) {
				i--;
				continue;
			} else {
				for (int d = 0; d < dim; d++) {
					clusterMeans[i][d] = pointArray[nextIndex][d];
				}
			}
		}
		
		// set pCgivenX=1 for the closest C for each point
		int minDistIndex = 0;
		double minDist, currentDist;
		for (int x = 0; x < pointArray.length; x++) {
			minDist = Double.MAX_VALUE;
			for (int i = 0; i < k; i++) {
				currentDist = euclideanDistance(clusterMeans[i], pointArray[x]);
				if (currentDist < minDist) {
					minDist = currentDist;
					minDistIndex = i;
				}
			}
			pCgivenX[minDistIndex][x] = 1.0;
		}
	}
1171225
public static void initialize(final Class<?> _class)
    {
        if (InfinispanCache.get().exists(SQLTable.UUIDCACHE)) {
            InfinispanCache.get().<UUID, SQLTable>getCache(SQLTable.UUIDCACHE).clear();
        } else {
            InfinispanCache.get().<UUID, SQLTable>getCache(SQLTable.UUIDCACHE)
                            .addListener(new CacheLogListener(SQLTable.LOG));
        }
        if (InfinispanCache.get().exists(SQLTable.IDCACHE)) {
            InfinispanCache.get().<Long, SQLTable>getCache(SQLTable.IDCACHE).clear();
        } else {
            InfinispanCache.get().<Long, SQLTable>getCache(SQLTable.IDCACHE)
                            .addListener(new CacheLogListener(SQLTable.LOG));
        }
        if (InfinispanCache.get().exists(SQLTable.NAMECACHE)) {
            InfinispanCache.get().<String, SQLTable>getCache(SQLTable.NAMECACHE).clear();
        } else {
            InfinispanCache.get().<String, SQLTable>getCache(SQLTable.NAMECACHE)
                            .addListener(new CacheLogListener(SQLTable.LOG));
        }
    }