use of org.opendaylight.controller.cluster.access.concepts.FrontendIdentifier in project controller by opendaylight.
the class FrontendMetadata method doApplySnapshot.
@Override
void doApplySnapshot(final FrontendShardDataTreeSnapshotMetadata snapshot) {
LOG.debug("{}: applying snapshot {} over clients {}", shardName, snapshot, clients);
clients.clear();
for (FrontendClientMetadata m : snapshot.getClients()) {
LOG.debug("{}: applying metadata {}", shardName, m);
final FrontendClientMetadataBuilder b = new FrontendClientMetadataBuilder(shardName, m);
final FrontendIdentifier client = m.getIdentifier().getFrontendId();
LOG.debug("{}: client {} updated to {}", shardName, client, b);
clients.put(client, b);
}
}
use of org.opendaylight.controller.cluster.access.concepts.FrontendIdentifier in project controller by opendaylight.
the class SimpleDataStoreClientActor method props.
public static Props props(@Nonnull final MemberName memberName, @Nonnull final String storeName, final ActorContext ctx, final String shardName) {
final String name = "datastore-" + storeName;
final FrontendIdentifier frontendId = FrontendIdentifier.create(memberName, FrontendType.forName(name));
return Props.create(SimpleDataStoreClientActor.class, () -> new SimpleDataStoreClientActor(frontendId, ctx, shardName));
}
use of org.opendaylight.controller.cluster.access.concepts.FrontendIdentifier in project controller by opendaylight.
the class ClientBackedTransactionChainTest method setUp.
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
final FrontendIdentifier frontendId = FrontendIdentifier.create(MemberName.forName("member"), FrontendType.forName("frontend"));
final ClientIdentifier clientId = ClientIdentifier.create(frontendId, 0);
final LocalHistoryIdentifier historyId = new LocalHistoryIdentifier(clientId, 0);
final TransactionIdentifier transactionId = new TransactionIdentifier(historyId, 0);
Mockito.when(history.getIdentifier()).thenReturn(historyId);
Mockito.when(transaction.getIdentifier()).thenReturn(transactionId);
Mockito.when(snapshot.getIdentifier()).thenReturn(transactionId);
Mockito.when(history.takeSnapshot()).thenReturn(snapshot);
Mockito.when(history.createTransaction()).thenReturn(transaction);
chain = new ClientBackedTransactionChain(history, false);
}
use of org.opendaylight.controller.cluster.access.concepts.FrontendIdentifier in project controller by opendaylight.
the class DistributedDataStoreClientActor method props.
public static Props props(@Nonnull final MemberName memberName, @Nonnull final String storeName, final ActorContext ctx) {
final String name = "datastore-" + storeName;
final FrontendIdentifier frontendId = FrontendIdentifier.create(memberName, FrontendType.forName(name));
return Props.create(DistributedDataStoreClientActor.class, () -> new DistributedDataStoreClientActor(frontendId, ctx));
}
Aggregations