if (obj instanceof HazelcastInstanceAware) {
HazelcastInstanceAware hazelcastInstanceAware = (HazelcastInstanceAware) obj;
hazelcastInstanceAware.setHazelcastInstance(instance);
}
if (obj instanceof NodeAware) {
NodeAware nodeAware = (NodeAware) obj;
nodeAware.setNode(instance.node);
}
if (hasExternalContext) {
return externalContext.initialize(obj);
}