use of io.atomix.primitive.PrimitiveId in project atomix by atomix.
the class RaftServiceManager method installService.
/**
* Restores the service associated with the given snapshot.
*
* @param reader the snapshot reader
*/
private void installService(SnapshotReader reader) {
PrimitiveId primitiveId = PrimitiveId.from(reader.readLong());
PrimitiveType primitiveType = raft.getPrimitiveTypes().get(reader.readString());
String serviceName = reader.readString();
// Get or create the service associated with the snapshot.
logger.debug("Installing service {} {}", primitiveId, serviceName);
RaftServiceContext service = initializeService(primitiveId, primitiveType, serviceName);
if (service != null) {
service.installSnapshot(reader);
}
}
Aggregations