Hi I am reading some code in a project which I just start to work on and see some code like this, which I could not understand.
public class A implements Ignite {
protected Ignite ignite;
.......
protected void checkIgnite() {
......
}
@Override
public <K, V> IgniteCache<K, V> createCache(CacheConfiguration<K, V> cacheCfg) {
checkIgnite();
return ignite.createCache(cacheCfg);
}
}
I don't understand the meaning of this class.
First, this class A is to implements the interface Ignite.Then why pass the interface Ignite into this class?
Second, for the method createCache in class A, it return ignite.createCache(cacheCfg), then what exactly is the implementation of this method?
Thank you!