use of org.apache.ignite.internal.processors.cache.persistence.metastorage.ReadOnlyMetastorage in project ignite by apache.
the class DistributedMetaStorageImpl method start.
/**
* {@inheritDoc}
* <br/>
* Create all required listeners.
*/
@Override
public void start() throws IgniteCheckedException {
if (!isPersistenceEnabled)
ver = INITIAL_VERSION;
else {
isp.registerMetastorageListener(new MetastorageLifecycleListener() {
/**
* {@inheritDoc}
*/
@Override
public void onReadyForRead(ReadOnlyMetastorage metastorage) throws IgniteCheckedException {
onMetaStorageReadyForRead(metastorage);
}
/**
* {@inheritDoc}
*/
@Override
public void onReadyForReadWrite(ReadWriteMetastorage metastorage) {
onMetaStorageReadyForWrite(metastorage);
}
});
}
GridDiscoveryManager discovery = ctx.discovery();
discovery.setCustomEventListener(DistributedMetaStorageUpdateMessage.class, this::onUpdateMessage);
discovery.setCustomEventListener(DistributedMetaStorageUpdateAckMessage.class, this::onAckMessage);
}
Aggregations