2 * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.cluster.datastore;
10 import org.opendaylight.controller.cluster.datastore.persisted.FrontendShardDataTreeSnapshotMetadata;
12 public class TestShard extends Shard {
13 // Message to request FrontendMetadata
14 public static final class RequestFrontendMetadata {
18 protected TestShard(AbstractBuilder<?, ?> builder) {
23 protected void handleNonRaftCommand(Object message) {
24 if (message instanceof RequestFrontendMetadata) {
25 FrontendShardDataTreeSnapshotMetadata metadataSnapshot = frontendMetadata.toSnapshot();
26 sender().tell(metadataSnapshot, self());
28 super.handleNonRaftCommand(message);
32 public static Shard.Builder builder() {
33 return new TestShard.Builder();
36 public static class Builder extends Shard.Builder {
38 super(TestShard.class);