├── .gitattributes ├── .github └── workflows │ ├── gerrit-verify.yaml │ └── github2gerrit.yaml ├── .gitignore ├── .gitreview ├── .mvn ├── jvm.config └── maven.config ├── .readthedocs.yml ├── INFO.yaml ├── LICENSE ├── NOTICE ├── artifacts └── pom.xml ├── atomix-storage ├── LICENSE ├── pom.xml └── src │ ├── main │ └── java │ │ └── io │ │ └── atomix │ │ ├── storage │ │ └── journal │ │ │ ├── Indexed.java │ │ │ ├── Journal.java │ │ │ ├── JournalReader.java │ │ │ ├── JournalSerdes.java │ │ │ ├── JournalWriter.java │ │ │ ├── SegmentedJournal.java │ │ │ ├── SegmentedJournalReader.java │ │ │ ├── SegmentedJournalWriter.java │ │ │ └── package-info.java │ │ └── utils │ │ └── serializer │ │ ├── BufferAwareByteArrayOutputStream.java │ │ ├── ByteArrayOutput.java │ │ ├── EntrySerializer.java │ │ ├── Kryo505ByteBufferInput.java │ │ ├── KryoEntryInput.java │ │ ├── KryoEntryOutput.java │ │ ├── KryoIOPool.java │ │ ├── KryoInputPool.java │ │ ├── KryoJournalSerdes.java │ │ ├── KryoJournalSerdesBuilder.java │ │ ├── KryoOutputPool.java │ │ ├── RegisteredType.java │ │ └── package-info.java │ └── test │ ├── java │ └── io │ │ └── atomix │ │ ├── storage │ │ └── journal │ │ │ ├── AbstractJournalTest.java │ │ │ ├── ByteArraySerdes.java │ │ │ ├── DiskJournalTest.java │ │ │ ├── MappedJournalTest.java │ │ │ ├── TestEntry.java │ │ │ └── TestEntrySerdes.java │ │ └── utils │ │ └── serializer │ │ ├── BufferAwareByteArrayOutputStreamTest.java │ │ ├── KryoInputPoolTest.java │ │ └── KryoOutputPoolTest.java │ └── resources │ └── logback.xml ├── benchmark ├── api │ ├── pom.xml │ └── src │ │ └── main │ │ └── yang │ │ ├── dsbenchmark.yang │ │ ├── ntfbench-payload.yang │ │ ├── ntfbenchmark.yang │ │ ├── rpcbench-payload.yang │ │ └── rpcbenchmark.yang ├── dsbenchmark │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── opendaylight │ │ └── dsbenchmark │ │ ├── BaListBuilder.java │ │ ├── DatastoreAbstractWriter.java │ │ ├── DomListBuilder.java │ │ ├── DsbenchmarkProvider.java │ │ ├── listener │ │ ├── DsbenchmarkListener.java │ │ └── DsbenchmarkListenerProvider.java │ │ ├── simpletx │ │ ├── SimpletxBaDelete.java │ │ ├── SimpletxBaRead.java │ │ ├── SimpletxBaWrite.java │ │ ├── SimpletxDomDelete.java │ │ ├── SimpletxDomRead.java │ │ └── SimpletxDomWrite.java │ │ └── txchain │ │ ├── TxchainBaDelete.java │ │ ├── TxchainBaRead.java │ │ ├── TxchainBaWrite.java │ │ ├── TxchainDomDelete.java │ │ ├── TxchainDomRead.java │ │ └── TxchainDomWrite.java ├── ntfbenchmark │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── ntfbenchmark │ │ └── impl │ │ ├── AbstractNtfbenchProducer.java │ │ ├── NtfbenchBlockingProducer.java │ │ ├── NtfbenchNonblockingProducer.java │ │ ├── NtfbenchTestListener.java │ │ ├── NtfbenchWTCListener.java │ │ └── NtfbenchmarkProvider.java ├── pom.xml ├── rpcbenchmark │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── rpcbenchmark │ │ └── impl │ │ ├── AbstractRpcbenchPayloadService.java │ │ ├── GlobalBindingRTCClient.java │ │ ├── GlobalBindingRTCServer.java │ │ ├── RTCClient.java │ │ ├── RoutedBindingRTCServer.java │ │ ├── RoutedBindingRTClient.java │ │ └── RpcbenchmarkProvider.java └── segjournal-benchmark │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── org │ │ └── opendaylight │ │ └── controller │ │ └── akka │ │ └── segjournal │ │ ├── BenchmarkMain.java │ │ └── BenchmarkUtils.java │ └── resources │ └── logback.xml ├── bnd-parent ├── bnd.bnd └── pom.xml ├── bundle-parent └── pom.xml ├── docs ├── _static │ └── logo.png ├── conf.py ├── conf.yaml ├── dev-guide.rst ├── favicon.ico ├── images │ ├── Get.png │ └── Put.png ├── index.rst ├── pom.xml └── requirements.txt ├── features ├── features-controller-experimental │ └── pom.xml ├── features-controller-testing │ └── pom.xml ├── features-controller │ └── pom.xml ├── odl-clustering-test-app │ ├── pom.xml │ └── src │ │ └── main │ │ └── feature │ │ └── feature.xml ├── odl-controller-akka │ ├── pom.xml │ └── src │ │ └── main │ │ └── history │ │ └── dependencies.xml ├── odl-controller-blueprint │ ├── pom.xml │ └── src │ │ └── main │ │ └── feature │ │ └── feature.xml ├── odl-controller-broker-local │ ├── pom.xml │ └── src │ │ └── main │ │ └── feature │ │ └── feature.xml ├── odl-controller-mdsal-common │ ├── pom.xml │ └── src │ │ └── main │ │ └── feature │ │ └── feature.xml ├── odl-controller-scala │ ├── pom.xml │ └── src │ │ └── main │ │ └── history │ │ └── dependencies.xml ├── odl-jolokia │ ├── pom.xml │ └── src │ │ └── main │ │ └── feature │ │ └── feature.xml ├── odl-lz4 │ ├── pom.xml │ └── src │ │ └── main │ │ └── feature │ │ └── template.xml ├── odl-mdsal-benchmark │ └── pom.xml ├── odl-mdsal-broker │ ├── pom.xml │ └── src │ │ └── main │ │ └── feature │ │ └── feature.xml ├── odl-mdsal-clustering-commons │ ├── pom.xml │ └── src │ │ └── main │ │ └── feature │ │ └── feature.xml ├── odl-mdsal-distributed-datastore │ ├── pom.xml │ └── src │ │ └── main │ │ └── feature │ │ └── feature.xml ├── odl-mdsal-remoterpc-connector │ └── pom.xml ├── odl-raft-api │ ├── pom.xml │ └── src │ │ └── main │ │ └── feature │ │ └── template.xml ├── odl-raft-spi │ ├── pom.xml │ └── src │ │ └── main │ │ └── feature │ │ └── template.xml ├── odl-toaster │ ├── pom.xml │ └── src │ │ └── main │ │ └── feature │ │ └── feature.xml ├── parent │ └── pom.xml ├── pom.xml └── single-feature-parent │ └── pom.xml ├── jolokia ├── pom.xml └── src │ └── main │ └── resources │ └── org.jolokia.osgi.cfg ├── karaf └── pom.xml ├── opendaylight ├── blueprint │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── opendaylight │ │ │ │ └── controller │ │ │ │ └── blueprint │ │ │ │ ├── BlueprintBundleTracker.java │ │ │ │ ├── BlueprintContainerRestartService.java │ │ │ │ ├── BlueprintContainerRestartServiceImpl.java │ │ │ │ ├── ext │ │ │ │ ├── AbstractDependentComponentFactoryMetadata.java │ │ │ │ ├── BindingContext.java │ │ │ │ ├── ComponentProcessor.java │ │ │ │ ├── ConfigXMLReaderException.java │ │ │ │ ├── DataStoreAppConfigDefaultXMLReader.java │ │ │ │ ├── DataStoreAppConfigMetadata.java │ │ │ │ ├── MandatoryServiceReferenceMetadata.java │ │ │ │ ├── OpendaylightNamespaceHandler.java │ │ │ │ ├── StaticServiceReferenceRecipe.java │ │ │ │ └── UpdateStrategy.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── opendaylight-blueprint-ext-1.0.0.xsd │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ └── blueprint │ │ │ └── tests │ │ │ └── DataStoreAppConfigDefaultXMLReaderTest.java │ │ └── resources │ │ └── opendaylight-sal-test-store-config.xml └── md-sal │ ├── cds-access-api │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── opendaylight │ │ │ │ └── controller │ │ │ │ └── cluster │ │ │ │ └── access │ │ │ │ ├── ABIVersion.java │ │ │ │ ├── AbstractVersionException.java │ │ │ │ ├── FutureVersionException.java │ │ │ │ ├── PastVersionException.java │ │ │ │ ├── commands │ │ │ │ ├── AbortLocalTransactionRequest.java │ │ │ │ ├── AbstractLocalTransactionRequest.java │ │ │ │ ├── AbstractReadPathTransactionRequest.java │ │ │ │ ├── AbstractReadTransactionRequest.java │ │ │ │ ├── CCF.java │ │ │ │ ├── CCR.java │ │ │ │ ├── CCS.java │ │ │ │ ├── CHR.java │ │ │ │ ├── ClosedTransactionException.java │ │ │ │ ├── CommitLocalTransactionRequest.java │ │ │ │ ├── ConnectClientFailure.java │ │ │ │ ├── ConnectClientRequest.java │ │ │ │ ├── ConnectClientSuccess.java │ │ │ │ ├── CreateLocalHistoryRequest.java │ │ │ │ ├── DHR.java │ │ │ │ ├── DeadHistoryException.java │ │ │ │ ├── DeadTransactionException.java │ │ │ │ ├── DestroyLocalHistoryRequest.java │ │ │ │ ├── ETR.java │ │ │ │ ├── ETS.java │ │ │ │ ├── ExistsTransactionRequest.java │ │ │ │ ├── ExistsTransactionSuccess.java │ │ │ │ ├── HF.java │ │ │ │ ├── HS.java │ │ │ │ ├── ITSR.java │ │ │ │ ├── ITSS.java │ │ │ │ ├── IncrementTransactionSequenceRequest.java │ │ │ │ ├── IncrementTransactionSequenceSuccess.java │ │ │ │ ├── LocalHistoryFailure.java │ │ │ │ ├── LocalHistoryRequest.java │ │ │ │ ├── LocalHistorySuccess.java │ │ │ │ ├── MTR.java │ │ │ │ ├── MTS.java │ │ │ │ ├── ModifyTransactionRequest.java │ │ │ │ ├── ModifyTransactionRequestBuilder.java │ │ │ │ ├── ModifyTransactionSuccess.java │ │ │ │ ├── NotLeaderException.java │ │ │ │ ├── OutOfOrderRequestException.java │ │ │ │ ├── OutOfSequenceEnvelopeException.java │ │ │ │ ├── PHR.java │ │ │ │ ├── PersistenceProtocol.java │ │ │ │ ├── PurgeLocalHistoryRequest.java │ │ │ │ ├── RTR.java │ │ │ │ ├── RTS.java │ │ │ │ ├── ReadTransactionRequest.java │ │ │ │ ├── ReadTransactionSuccess.java │ │ │ │ ├── STR.java │ │ │ │ ├── STS.java │ │ │ │ ├── SkipTransactionsRequest.java │ │ │ │ ├── SkipTransactionsResponse.java │ │ │ │ ├── TAR.java │ │ │ │ ├── TAS.java │ │ │ │ ├── TCCS.java │ │ │ │ ├── TCS.java │ │ │ │ ├── TDCR.java │ │ │ │ ├── TF.java │ │ │ │ ├── TPCR.java │ │ │ │ ├── TPCS.java │ │ │ │ ├── TPR.java │ │ │ │ ├── TPS.java │ │ │ │ ├── TransactionAbortRequest.java │ │ │ │ ├── TransactionAbortSuccess.java │ │ │ │ ├── TransactionCanCommitSuccess.java │ │ │ │ ├── TransactionCommitSuccess.java │ │ │ │ ├── TransactionDataModification.java │ │ │ │ ├── TransactionDelete.java │ │ │ │ ├── TransactionDoCommitRequest.java │ │ │ │ ├── TransactionFailure.java │ │ │ │ ├── TransactionMerge.java │ │ │ │ ├── TransactionModification.java │ │ │ │ ├── TransactionPreCommitRequest.java │ │ │ │ ├── TransactionPreCommitSuccess.java │ │ │ │ ├── TransactionPurgeRequest.java │ │ │ │ ├── TransactionPurgeResponse.java │ │ │ │ ├── TransactionRequest.java │ │ │ │ ├── TransactionSuccess.java │ │ │ │ ├── TransactionWrite.java │ │ │ │ ├── UnknownHistoryException.java │ │ │ │ └── package-info.java │ │ │ │ ├── concepts │ │ │ │ ├── CI.java │ │ │ │ ├── ClientIdentifier.java │ │ │ │ ├── Envelope.java │ │ │ │ ├── FE.java │ │ │ │ ├── FI.java │ │ │ │ ├── FT.java │ │ │ │ ├── FailureEnvelope.java │ │ │ │ ├── FrontendIdentifier.java │ │ │ │ ├── FrontendType.java │ │ │ │ ├── HI.java │ │ │ │ ├── LocalHistoryIdentifier.java │ │ │ │ ├── MN.java │ │ │ │ ├── MemberName.java │ │ │ │ ├── Message.java │ │ │ │ ├── RE.java │ │ │ │ ├── Request.java │ │ │ │ ├── RequestEnvelope.java │ │ │ │ ├── RequestException.java │ │ │ │ ├── RequestFailure.java │ │ │ │ ├── RequestSuccess.java │ │ │ │ ├── Response.java │ │ │ │ ├── ResponseEnvelope.java │ │ │ │ ├── RetiredGenerationException.java │ │ │ │ ├── RuntimeRequestException.java │ │ │ │ ├── SE.java │ │ │ │ ├── SliceableMessage.java │ │ │ │ ├── SuccessEnvelope.java │ │ │ │ ├── TI.java │ │ │ │ ├── TransactionIdentifier.java │ │ │ │ ├── UnsupportedRequestException.java │ │ │ │ └── package-info.java │ │ │ │ └── package-info.java │ │ └── yang │ │ │ └── odl-controller-cds-types.yang │ │ └── test │ │ └── java │ │ └── org │ │ └── opendaylight │ │ └── controller │ │ └── cluster │ │ └── access │ │ ├── ABIVersionTest.java │ │ ├── commands │ │ ├── AbortLocalTransactionRequestTest.java │ │ ├── AbstractLocalTransactionRequestTest.java │ │ ├── AbstractReadTransactionRequestTest.java │ │ ├── AbstractRequestFailureTest.java │ │ ├── AbstractRequestSuccessTest.java │ │ ├── AbstractTransactionRequestTest.java │ │ ├── AbstractTransactionSuccessTest.java │ │ ├── ClosedTransactionExceptionTest.java │ │ ├── CommitLocalTransactionRequestTest.java │ │ ├── ConnectClientFailureTest.java │ │ ├── ConnectClientRequestTest.java │ │ ├── ConnectClientSuccessTest.java │ │ ├── DeadHistoryExceptionTest.java │ │ ├── DeadTransactionExceptionTest.java │ │ ├── ExistsTransactionRequestTest.java │ │ ├── ExistsTransactionSuccessTest.java │ │ ├── LocalHistoryFailureTest.java │ │ ├── LocalHistorySuccessTest.java │ │ ├── ModifyTransactionRequestBuilderTest.java │ │ ├── ModifyTransactionRequestEmptyTest.java │ │ ├── ModifyTransactionRequestTest.java │ │ ├── ModifyTransactionSuccessTest.java │ │ ├── NotLeaderExceptionTest.java │ │ ├── OutOfOrderRequestExceptionTest.java │ │ ├── ReadTransactionRequestTest.java │ │ ├── ReadTransactionSuccessNoDataTest.java │ │ ├── ReadTransactionSuccessTest.java │ │ ├── SkipTransactionsRequestTest.java │ │ ├── SkipTransactionsResponseTest.java │ │ ├── TransactionAbortRequestTest.java │ │ ├── TransactionAbortSuccessTest.java │ │ ├── TransactionCanCommitSuccessTest.java │ │ ├── TransactionCommitSuccessTest.java │ │ ├── TransactionDoCommitRequestTest.java │ │ ├── TransactionFailureTest.java │ │ ├── TransactionPreCommitRequestTest.java │ │ ├── TransactionPreCommitSuccessTest.java │ │ ├── TransactionPurgeRequestTest.java │ │ ├── TransactionPurgeResponseTest.java │ │ └── UnknownHistoryExceptionTest.java │ │ └── concepts │ │ ├── AbstractEnvelopeTest.java │ │ ├── AbstractIdentifierTest.java │ │ ├── AbstractRequestTest.java │ │ ├── ClientIdentifierTest.java │ │ ├── FailureEnvelopeTest.java │ │ ├── FrontendIdentifierTest.java │ │ ├── FrontendTypeTest.java │ │ ├── LocalHistoryIdentifierTest.java │ │ ├── MemberNameTest.java │ │ ├── RequestEnvelopeTest.java │ │ ├── RequestExceptionTest.java │ │ ├── RetiredGenerationExceptionTest.java │ │ ├── RuntimeRequestExceptionTest.java │ │ ├── SuccessEnvelopeTest.java │ │ ├── TransactionIdentifierTest.java │ │ └── UnsupportedRequestExceptionTest.java │ ├── cds-access-client │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ └── cluster │ │ │ └── access │ │ │ └── client │ │ │ ├── AbstractClientActor.java │ │ │ ├── AbstractClientActorBehavior.java │ │ │ ├── AbstractClientActorContext.java │ │ │ ├── AbstractClientConnection.java │ │ │ ├── AbstractReceivingClientConnection.java │ │ │ ├── AveragingProgressTracker.java │ │ │ ├── BackendInfo.java │ │ │ ├── BackendInfoResolver.java │ │ │ ├── ClientActorBehavior.java │ │ │ ├── ClientActorConfig.java │ │ │ ├── ClientActorContext.java │ │ │ ├── ConnectedClientConnection.java │ │ │ ├── ConnectingClientConnection.java │ │ │ ├── ConnectionEntry.java │ │ │ ├── InitialClientActorContext.java │ │ │ ├── InternalCommand.java │ │ │ ├── InversibleLock.java │ │ │ ├── InversibleLockException.java │ │ │ ├── NoProgressException.java │ │ │ ├── PersistenceTombstone.java │ │ │ ├── ProgressTracker.java │ │ │ ├── ReconnectForwarder.java │ │ │ ├── ReconnectingClientConnection.java │ │ │ ├── RecoveredClientActorBehavior.java │ │ │ ├── RecoveringClientActorBehavior.java │ │ │ ├── RecoveryException.java │ │ │ ├── RequestCallback.java │ │ │ ├── RequestTimeoutException.java │ │ │ ├── SavingClientActorBehavior.java │ │ │ ├── SimpleReconnectForwarder.java │ │ │ ├── TransmitQueue.java │ │ │ ├── TransmittedConnectionEntry.java │ │ │ ├── TxDetails.java │ │ │ └── package-info.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ └── cluster │ │ │ └── access │ │ │ └── client │ │ │ ├── AbstractClientActorTest.java │ │ │ ├── AbstractClientConnectionTest.java │ │ │ ├── AbstractTransmitQueueTest.java │ │ │ ├── AccessClientUtil.java │ │ │ ├── ActorBehaviorTest.java │ │ │ ├── AveragingProgressTrackerTest.java │ │ │ ├── ClientActorContextTest.java │ │ │ ├── ConnectedClientConnectionTest.java │ │ │ ├── ConnectingClientConnectionTest.java │ │ │ ├── ConnectionEntryMatcher.java │ │ │ ├── ConnectionEntryTest.java │ │ │ ├── HaltedTransmitQueueTest.java │ │ │ ├── InversibleLockTest.java │ │ │ ├── MockedSnapshotStore.java │ │ │ ├── NoProgressExceptionTest.java │ │ │ ├── ReconnectingClientConnectionTest.java │ │ │ └── TransmittingTransmitQueueTest.java │ │ └── resources │ │ └── application.conf │ ├── cds-dom-api │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── opendaylight │ │ └── controller │ │ └── cluster │ │ └── dom │ │ └── api │ │ ├── LeaderLocation.java │ │ ├── LeaderLocationListener.java │ │ └── package-info.java │ ├── cds-mgmt-api │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ ├── module-info.java │ │ └── org │ │ └── opendaylight │ │ └── controller │ │ └── cluster │ │ ├── datastore │ │ └── jmx │ │ │ └── mbeans │ │ │ ├── CommitStatsMXBean.java │ │ │ ├── DatastoreConfigurationMXBean.java │ │ │ ├── DatastoreInfoMXBean.java │ │ │ └── shard │ │ │ ├── ShardDataTreeListenerInfoMXBean.java │ │ │ └── ShardStatsMXBean.java │ │ └── mgmt │ │ └── api │ │ ├── DataTreeListenerInfo.java │ │ └── FollowerInfo.java │ ├── eos-dom-akka │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── opendaylight │ │ │ │ ├── controller │ │ │ │ └── eos │ │ │ │ │ └── akka │ │ │ │ │ ├── AkkaEntityOwnershipService.java │ │ │ │ │ ├── CandidateRegistration.java │ │ │ │ │ ├── DataCenterControl.java │ │ │ │ │ ├── ListenerRegistration.java │ │ │ │ │ ├── bootstrap │ │ │ │ │ ├── EOSMain.java │ │ │ │ │ └── command │ │ │ │ │ │ ├── BootstrapCommand.java │ │ │ │ │ │ ├── GetRunningContext.java │ │ │ │ │ │ ├── RunningContext.java │ │ │ │ │ │ └── Terminate.java │ │ │ │ │ ├── owner │ │ │ │ │ ├── checker │ │ │ │ │ │ ├── EntityRpcHandler.java │ │ │ │ │ │ ├── OwnerStateChecker.java │ │ │ │ │ │ └── command │ │ │ │ │ │ │ ├── AbstractEntityRequest.java │ │ │ │ │ │ │ ├── GetCandidates.java │ │ │ │ │ │ │ ├── GetCandidatesForEntity.java │ │ │ │ │ │ │ ├── GetEntitiesReply.java │ │ │ │ │ │ │ ├── GetEntitiesRequest.java │ │ │ │ │ │ │ ├── GetEntityOwnerReply.java │ │ │ │ │ │ │ ├── GetEntityOwnerRequest.java │ │ │ │ │ │ │ ├── GetEntityReply.java │ │ │ │ │ │ │ ├── GetEntityRequest.java │ │ │ │ │ │ │ ├── GetOwnerForEntity.java │ │ │ │ │ │ │ ├── GetOwnershipState.java │ │ │ │ │ │ │ ├── GetOwnershipStateReply.java │ │ │ │ │ │ │ ├── InternalGetReply.java │ │ │ │ │ │ │ ├── OwnerDataResponse.java │ │ │ │ │ │ │ ├── SingleEntityOwnerDataResponse.java │ │ │ │ │ │ │ ├── StateCheckerCommand.java │ │ │ │ │ │ │ ├── StateCheckerReply.java │ │ │ │ │ │ │ └── StateCheckerRequest.java │ │ │ │ │ └── supervisor │ │ │ │ │ │ ├── AbstractSupervisor.java │ │ │ │ │ │ ├── CandidateCleaner.java │ │ │ │ │ │ ├── IdleSupervisor.java │ │ │ │ │ │ ├── OwnerSupervisor.java │ │ │ │ │ │ ├── OwnerSyncer.java │ │ │ │ │ │ └── command │ │ │ │ │ │ ├── AbstractEntityRequest.java │ │ │ │ │ │ ├── ActivateDataCenter.java │ │ │ │ │ │ ├── CandidatesChanged.java │ │ │ │ │ │ ├── ClearCandidates.java │ │ │ │ │ │ ├── ClearCandidatesForMember.java │ │ │ │ │ │ ├── ClearCandidatesResponse.java │ │ │ │ │ │ ├── ClearCandidatesUpdateResponse.java │ │ │ │ │ │ ├── DataCenterActivated.java │ │ │ │ │ │ ├── DataCenterDeactivated.java │ │ │ │ │ │ ├── DeactivateDataCenter.java │ │ │ │ │ │ ├── GetEntitiesBackendReply.java │ │ │ │ │ │ ├── GetEntitiesBackendRequest.java │ │ │ │ │ │ ├── GetEntityBackendReply.java │ │ │ │ │ │ ├── GetEntityBackendRequest.java │ │ │ │ │ │ ├── GetEntityOwnerBackendReply.java │ │ │ │ │ │ ├── GetEntityOwnerBackendRequest.java │ │ │ │ │ │ ├── InitialCandidateSync.java │ │ │ │ │ │ ├── InitialOwnerSync.java │ │ │ │ │ │ ├── InternalClusterEvent.java │ │ │ │ │ │ ├── MemberDownEvent.java │ │ │ │ │ │ ├── MemberReachableEvent.java │ │ │ │ │ │ ├── MemberUnreachableEvent.java │ │ │ │ │ │ ├── MemberUpEvent.java │ │ │ │ │ │ ├── OwnerChanged.java │ │ │ │ │ │ ├── OwnerSupervisorCommand.java │ │ │ │ │ │ ├── OwnerSupervisorReply.java │ │ │ │ │ │ └── OwnerSupervisorRequest.java │ │ │ │ │ └── registry │ │ │ │ │ ├── candidate │ │ │ │ │ ├── CandidateRegistry.java │ │ │ │ │ ├── CandidateRegistryInit.java │ │ │ │ │ └── command │ │ │ │ │ │ ├── AbstractCandidateCommand.java │ │ │ │ │ │ ├── CandidateRegistryCommand.java │ │ │ │ │ │ ├── CandidateRemovalFailed.java │ │ │ │ │ │ ├── CandidateRemovalFinished.java │ │ │ │ │ │ ├── InternalUpdateResponse.java │ │ │ │ │ │ ├── RegisterCandidate.java │ │ │ │ │ │ ├── RemovePreviousCandidates.java │ │ │ │ │ │ └── UnregisterCandidate.java │ │ │ │ │ └── listener │ │ │ │ │ ├── owner │ │ │ │ │ ├── SingleEntityListenerActor.java │ │ │ │ │ └── command │ │ │ │ │ │ ├── InitialOwnerSync.java │ │ │ │ │ │ ├── ListenerCommand.java │ │ │ │ │ │ └── OwnerChanged.java │ │ │ │ │ └── type │ │ │ │ │ ├── EntityTypeListenerActor.java │ │ │ │ │ ├── EntityTypeListenerRegistry.java │ │ │ │ │ └── command │ │ │ │ │ ├── CandidatesChanged.java │ │ │ │ │ ├── EntityOwnerChanged.java │ │ │ │ │ ├── RegisterListener.java │ │ │ │ │ ├── TerminateListener.java │ │ │ │ │ ├── TypeListenerCommand.java │ │ │ │ │ ├── TypeListenerRegistryCommand.java │ │ │ │ │ └── UnregisterListener.java │ │ │ │ └── yang │ │ │ │ └── gen │ │ │ │ └── v1 │ │ │ │ └── urn │ │ │ │ └── opendaylight │ │ │ │ └── params │ │ │ │ └── xml │ │ │ │ └── ns │ │ │ │ └── yang │ │ │ │ └── controller │ │ │ │ └── entity │ │ │ │ └── owners │ │ │ │ └── norev │ │ │ │ └── EntityNameBuilder.java │ │ └── yang │ │ │ └── odl-akka-eos.yang │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ └── eos │ │ │ └── akka │ │ │ ├── AbstractNativeEosTest.java │ │ │ ├── AkkaEntityOwnershipServiceTest.java │ │ │ ├── DataCentersTest.java │ │ │ ├── EntityRpcHandlerTest.java │ │ │ ├── SingleNodeTest.java │ │ │ ├── ThreeNodeBaseTest.java │ │ │ ├── ThreeNodeReachabilityTest.java │ │ │ ├── owner │ │ │ └── supervisor │ │ │ │ └── OwnerSupervisorTest.java │ │ │ └── service │ │ │ └── ClusterSingletonIntegrationTest.java │ │ └── resources │ │ ├── application.conf │ │ └── simplelogger.properties │ ├── mdsal-it-base │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── opendaylight │ │ └── controller │ │ └── mdsal │ │ └── it │ │ └── base │ │ └── AbstractMdsalTestBase.java │ ├── mdsal-it-parent │ └── pom.xml │ ├── parent │ └── pom.xml │ ├── pom.xml │ ├── sal-akka-raft-example │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ └── cluster │ │ │ └── example │ │ │ ├── ClientActor.java │ │ │ ├── ExampleActor.java │ │ │ ├── ExampleConfigParamsImpl.java │ │ │ ├── ExampleRoleChangeListener.java │ │ │ ├── LogGenerator.java │ │ │ ├── Main.java │ │ │ ├── TestDriver.java │ │ │ └── messages │ │ │ ├── KVv1.java │ │ │ ├── KeyValue.java │ │ │ ├── KeyValueSaved.java │ │ │ ├── PrintRole.java │ │ │ ├── PrintState.java │ │ │ ├── RegisterListener.java │ │ │ └── SetNotifiers.java │ │ └── resources │ │ ├── application.conf │ │ └── simplelogger.properties │ ├── sal-akka-segmented-journal │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ └── akka │ │ │ └── segjournal │ │ │ ├── DataJournal.java │ │ │ ├── DataJournalEntry.java │ │ │ ├── DataJournalEntrySerdes.java │ │ │ ├── DataJournalV0.java │ │ │ ├── LongEntrySerdes.java │ │ │ ├── SegmentedFileJournal.java │ │ │ └── SegmentedJournalActor.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ └── akka │ │ │ └── segjournal │ │ │ ├── SegmentedFileJournalSpecTest.java │ │ │ └── SegmentedFileJournalTest.java │ │ └── resources │ │ └── SegmentedFileJournalTest.conf │ ├── sal-binding-it │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ └── test │ │ │ └── sal │ │ │ └── binding │ │ │ └── it │ │ │ └── TestHelper.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ └── test │ │ │ └── sal │ │ │ └── binding │ │ │ └── it │ │ │ ├── AbstractIT.java │ │ │ ├── DataServiceIT.java │ │ │ ├── NotificationIT.java │ │ │ └── RoutedServiceIT.java │ │ └── resources │ │ └── controller.xml │ ├── sal-cluster-admin-api │ ├── pom.xml │ └── src │ │ └── main │ │ └── yang │ │ └── cluster-admin.yang │ ├── sal-cluster-admin-impl │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ └── cluster │ │ │ └── datastore │ │ │ └── admin │ │ │ ├── ClusterAdminRpcService.java │ │ │ ├── OSGiClusterAdmin.java │ │ │ └── ShardIdentifier.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ └── cluster │ │ │ └── datastore │ │ │ └── admin │ │ │ └── ClusterAdminRpcServiceTest.java │ │ └── resources │ │ └── simplelogger.properties │ ├── sal-cluster-admin-karaf-cli │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── opendaylight │ │ └── controller │ │ └── cluster │ │ └── datastore │ │ └── admin │ │ └── command │ │ ├── AbstractRpcAction.java │ │ ├── ActivateEosDatacenterCommand.java │ │ ├── AddReplicasForAllShardsCommand.java │ │ ├── AddShardReplicaCommand.java │ │ ├── BackupDatastoreCommand.java │ │ ├── ChangeMemberVotingStatesForAllShardsCommand.java │ │ ├── ChangeMemberVotingStatesForShardCommand.java │ │ ├── DeactivateEosDatacenterCommand.java │ │ ├── FlipMemberVotingStatesForAllShardsCommand.java │ │ ├── GetKnownClientsForAllShardsCommand.java │ │ ├── GetShardRoleCommand.java │ │ ├── LocateShardCommand.java │ │ ├── MakeLeaderLocalCommand.java │ │ ├── RemoveAllShardReplicasCommand.java │ │ └── RemoveShardReplicaCommand.java │ ├── sal-clustering-commons │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ └── cluster │ │ │ ├── ActorSystemProvider.java │ │ │ ├── ActorSystemProviderListener.java │ │ │ ├── common │ │ │ └── actor │ │ │ │ ├── AbstractConfig.java │ │ │ │ ├── AbstractUntypedActor.java │ │ │ │ ├── AbstractUntypedActorWithMetering.java │ │ │ │ ├── AbstractUntypedPersistentActor.java │ │ │ │ ├── AbstractUntypedPersistentActorWithMetering.java │ │ │ │ ├── AkkaConfigurationReader.java │ │ │ │ ├── CommonConfig.java │ │ │ │ ├── Dispatchers.java │ │ │ │ ├── ExecuteInSelfActor.java │ │ │ │ ├── ExecuteInSelfMessage.java │ │ │ │ ├── FileAkkaConfigurationReader.java │ │ │ │ ├── MessageTracker.java │ │ │ │ ├── MeteredBoundedMailbox.java │ │ │ │ ├── MeteringBehavior.java │ │ │ │ ├── Monitor.java │ │ │ │ ├── QuarantinedMonitorActor.java │ │ │ │ ├── UnboundedDequeBasedControlAwareMailbox.java │ │ │ │ └── UnifiedConfig.java │ │ │ ├── datastore │ │ │ ├── node │ │ │ │ └── utils │ │ │ │ │ ├── NormalizedNodeNavigator.java │ │ │ │ │ ├── NormalizedNodeVisitor.java │ │ │ │ │ ├── stream │ │ │ │ │ └── SerializationUtils.java │ │ │ │ │ └── transformer │ │ │ │ │ ├── AbstractNormalizedNodePruner.java │ │ │ │ │ ├── ReusableNormalizedNodePruner.java │ │ │ │ │ └── UintAdaptingPruner.java │ │ │ └── util │ │ │ │ └── AbstractDataTreeModificationCursor.java │ │ │ ├── messaging │ │ │ ├── AbortSlicing.java │ │ │ ├── AssembledMessageState.java │ │ │ ├── AssemblerClosedException.java │ │ │ ├── AssemblerSealedException.java │ │ │ ├── MessageAssembler.java │ │ │ ├── MessageSlice.java │ │ │ ├── MessageSliceException.java │ │ │ ├── MessageSliceIdentifier.java │ │ │ ├── MessageSliceReply.java │ │ │ ├── MessageSlicer.java │ │ │ ├── SliceOptions.java │ │ │ └── SlicedMessageState.java │ │ │ ├── persistence │ │ │ ├── InputOutputStreamFactory.java │ │ │ ├── LZ4InputOutputStreamSupport.java │ │ │ ├── LocalSnapshotStore.java │ │ │ └── PlainInputOutputStreamSupport.java │ │ │ ├── reporting │ │ │ └── MetricsReporter.java │ │ │ └── schema │ │ │ └── provider │ │ │ ├── RemoteYangTextSourceProvider.java │ │ │ └── impl │ │ │ ├── RemoteSchemaProvider.java │ │ │ ├── RemoteYangTextSourceProviderImpl.java │ │ │ └── YangTextSchemaSourceSerializationProxy.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ └── cluster │ │ │ ├── common │ │ │ └── actor │ │ │ │ ├── CommonConfigTest.java │ │ │ │ ├── MessageTrackerTest.java │ │ │ │ ├── MeteredBoundedMailboxTest.java │ │ │ │ └── QuarantinedMonitorActorTest.java │ │ │ ├── datastore │ │ │ ├── node │ │ │ │ └── utils │ │ │ │ │ ├── stream │ │ │ │ │ └── SerializationUtilsTest.java │ │ │ │ │ └── transformer │ │ │ │ │ ├── NormalizedNodePrunerTest.java │ │ │ │ │ └── UintAdaptingPrunerTest.java │ │ │ └── util │ │ │ │ └── TestModel.java │ │ │ ├── messaging │ │ │ ├── AbortSlicingTest.java │ │ │ ├── AbstractMessagingTest.java │ │ │ ├── BytesMessage.java │ │ │ ├── MessageAssemblerTest.java │ │ │ ├── MessageSliceIdentifierTest.java │ │ │ ├── MessageSliceReplyTest.java │ │ │ ├── MessageSliceTest.java │ │ │ ├── MessageSlicerTest.java │ │ │ ├── MessageSlicingIntegrationTest.java │ │ │ └── StringIdentifier.java │ │ │ ├── persistence │ │ │ ├── LocalSnapshotStoreSpecTest.java │ │ │ └── LocalSnapshotStoreTest.java │ │ │ └── schema │ │ │ └── provider │ │ │ └── impl │ │ │ ├── RemoteSchemaProviderTest.java │ │ │ ├── RemoteYangTextSourceProviderImplTest.java │ │ │ └── YangTextSourceSerializationProxyTest.java │ │ └── resources │ │ ├── LocalSnapshotStoreTest.conf │ │ ├── application.conf │ │ ├── augment_choice.xml │ │ ├── augment_choice.yang │ │ ├── odl-ctlr1923.yang │ │ ├── odl-datastore-augmentation.yang │ │ ├── odl-datastore-test-notification.yang │ │ ├── odl-datastore-test.yang │ │ ├── org │ │ └── opendaylight │ │ │ └── controller │ │ │ └── xml │ │ │ └── codec │ │ │ └── rpcTest.yang │ │ ├── reference.conf │ │ ├── simple_xml_with_attributes.xml │ │ ├── simplelogger.properties │ │ ├── test.yang │ │ └── version-compatibility-serialized-data │ │ ├── DataChangeListenerMessagesData │ │ ├── ListenerRegistrationMessagesData │ │ ├── NormalizedNodeMessagesTestData │ │ ├── PersistentMessagesTestData │ │ ├── ShardManagerMessagesTestData │ │ ├── ShardTransactionChainMessagesTestData │ │ ├── ShardTransactionMessagesTestData │ │ ├── ThreePhaseCommitCohortMessagesTestData │ │ └── readme.txt │ ├── sal-clustering-config │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ └── initial │ │ ├── datastore.cfg │ │ ├── factory-pekko.conf │ │ ├── module-shards.conf │ │ ├── modules.conf │ │ └── pekko.conf │ ├── sal-common-util │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── opendaylight │ │ └── controller │ │ └── md │ │ └── sal │ │ └── common │ │ └── util │ │ └── jmx │ │ ├── AbstractMXBean.java │ │ ├── ThreadExecutorStats.java │ │ ├── ThreadExecutorStatsMXBean.java │ │ └── ThreadExecutorStatsMXBeanImpl.java │ ├── sal-distributed-datastore │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── opendaylight │ │ │ │ └── controller │ │ │ │ └── cluster │ │ │ │ ├── akka │ │ │ │ ├── impl │ │ │ │ │ ├── ActorSystemProviderImpl.java │ │ │ │ │ └── AkkaConfigFactory.java │ │ │ │ └── osgi │ │ │ │ │ └── impl │ │ │ │ │ ├── BundleClassLoaderFactory.java │ │ │ │ │ ├── OSGiActorSystemProvider.java │ │ │ │ │ └── QuarantinedMonitorActorPropsFactory.java │ │ │ │ ├── databroker │ │ │ │ ├── AbstractShardedTransaction.java │ │ │ │ ├── ClientBackedDataStore.java │ │ │ │ ├── ClientBackedReadTransaction.java │ │ │ │ ├── ClientBackedReadWriteTransaction.java │ │ │ │ ├── ClientBackedTransaction.java │ │ │ │ ├── ClientBackedTransactionChain.java │ │ │ │ ├── ClientBackedWriteTransaction.java │ │ │ │ ├── CommitStatsMXBeanImpl.java │ │ │ │ ├── ConcurrentDOMDataBroker.java │ │ │ │ ├── DataBrokerCommitExecutor.java │ │ │ │ └── actors │ │ │ │ │ └── dds │ │ │ │ │ ├── AbstractClientHandle.java │ │ │ │ │ ├── AbstractClientHistory.java │ │ │ │ │ ├── AbstractDataStoreClientActor.java │ │ │ │ │ ├── AbstractDataStoreClientBehavior.java │ │ │ │ │ ├── AbstractProxyTransaction.java │ │ │ │ │ ├── AbstractShardBackendResolver.java │ │ │ │ │ ├── AbstractTransactionCommitCohort.java │ │ │ │ │ ├── BouncingReconnectForwarder.java │ │ │ │ │ ├── ClientLocalHistory.java │ │ │ │ │ ├── ClientSnapshot.java │ │ │ │ │ ├── ClientTransaction.java │ │ │ │ │ ├── ClientTransactionCommitCohort.java │ │ │ │ │ ├── DataStoreClient.java │ │ │ │ │ ├── DirectTransactionCommitCohort.java │ │ │ │ │ ├── DistributedDataStoreClientActor.java │ │ │ │ │ ├── DistributedDataStoreClientBehavior.java │ │ │ │ │ ├── EmptyTransactionCommitCohort.java │ │ │ │ │ ├── FailedDataTreeModification.java │ │ │ │ │ ├── FailedDataTreeModificationException.java │ │ │ │ │ ├── GetClientRequest.java │ │ │ │ │ ├── HistoryReconnectCohort.java │ │ │ │ │ ├── LocalAbortable.java │ │ │ │ │ ├── LocalProxyTransaction.java │ │ │ │ │ ├── LocalReadOnlyProxyTransaction.java │ │ │ │ │ ├── LocalReadWriteProxyTransaction.java │ │ │ │ │ ├── ModuleShardBackendResolver.java │ │ │ │ │ ├── ProxyHistory.java │ │ │ │ │ ├── ProxyReconnectCohort.java │ │ │ │ │ ├── RemoteProxyTransaction.java │ │ │ │ │ ├── ShardBackendInfo.java │ │ │ │ │ ├── SimpleDataStoreClientActor.java │ │ │ │ │ ├── SimpleDataStoreClientBehavior.java │ │ │ │ │ ├── SimpleShardBackendResolver.java │ │ │ │ │ ├── SingleClientHistory.java │ │ │ │ │ ├── VotingFuture.java │ │ │ │ │ └── package-info.java │ │ │ │ └── datastore │ │ │ │ ├── AbstractDataStore.java │ │ │ │ ├── AbstractDatastoreContextIntrospectorFactory.java │ │ │ │ ├── AbstractFrontendHistory.java │ │ │ │ ├── AbstractShardDataTreeNotificationPublisherActorProxy.java │ │ │ │ ├── AbstractShardDataTreeTransaction.java │ │ │ │ ├── ChainedCommitCohort.java │ │ │ │ ├── ClusterWrapper.java │ │ │ │ ├── ClusterWrapperImpl.java │ │ │ │ ├── CommitCohort.java │ │ │ │ ├── CompositeDataTreeCohort.java │ │ │ │ ├── DOMDataTreeCandidateTO.java │ │ │ │ ├── DataStoreVersions.java │ │ │ │ ├── DataTreeChangeListenerActor.java │ │ │ │ ├── DataTreeChangeListenerProxy.java │ │ │ │ ├── DataTreeChangeListenerSupport.java │ │ │ │ ├── DataTreeCohortActor.java │ │ │ │ ├── DataTreeCohortActorRegistry.java │ │ │ │ ├── DataTreeCohortRegistrationProxy.java │ │ │ │ ├── DatastoreConfigurationMXBeanImpl.java │ │ │ │ ├── DatastoreContext.java │ │ │ │ ├── DatastoreContextFactory.java │ │ │ │ ├── DatastoreContextIntrospector.java │ │ │ │ ├── DatastoreContextIntrospectorFactory.java │ │ │ │ ├── DatastoreContextPropertiesUpdater.java │ │ │ │ ├── DatastoreInfoMXBeanImpl.java │ │ │ │ ├── DatastoreSnapshotRestore.java │ │ │ │ ├── DefaultDatastoreContextIntrospectorFactory.java │ │ │ │ ├── DefaultDatastoreSnapshotRestore.java │ │ │ │ ├── DefaultShardDataTreeChangeListenerPublisher.java │ │ │ │ ├── DefaultShardStatsMXBean.java │ │ │ │ ├── DelayedDataTreeChangeListenerRegistration.java │ │ │ │ ├── DistributedDataStoreFactory.java │ │ │ │ ├── DistributedDataStoreInterface.java │ │ │ │ ├── ForwardingDataTreeChangeListener.java │ │ │ │ ├── FrontendClientMetadataBuilder.java │ │ │ │ ├── FrontendHistoryMetadataBuilder.java │ │ │ │ ├── FrontendMetadata.java │ │ │ │ ├── FrontendReadOnlyTransaction.java │ │ │ │ ├── FrontendReadWriteTransaction.java │ │ │ │ ├── FrontendTransaction.java │ │ │ │ ├── LeaderFrontendState.java │ │ │ │ ├── LeaderLocalDelegateFactory.java │ │ │ │ ├── LocalFrontendHistory.java │ │ │ │ ├── OSGiDOMStore.java │ │ │ │ ├── OSGiDatastoreContextIntrospectorFactory.java │ │ │ │ ├── OSGiDistributedDataStore.java │ │ │ │ ├── OnDemandShardStateCache.java │ │ │ │ ├── ReadOnlyShardDataTreeTransaction.java │ │ │ │ ├── ReadWriteShardDataTreeTransaction.java │ │ │ │ ├── RootDataTreeChangeListenerActor.java │ │ │ │ ├── RootDataTreeChangeListenerProxy.java │ │ │ │ ├── Shard.java │ │ │ │ ├── ShardDataTree.java │ │ │ │ ├── ShardDataTreeChangeListenerPublisher.java │ │ │ │ ├── ShardDataTreeChangeListenerPublisherActorProxy.java │ │ │ │ ├── ShardDataTreeChangePublisherActor.java │ │ │ │ ├── ShardDataTreeListenerInfoMXBeanImpl.java │ │ │ │ ├── ShardDataTreeMetadata.java │ │ │ │ ├── ShardDataTreeNotificationPublisher.java │ │ │ │ ├── ShardDataTreeNotificationPublisherActor.java │ │ │ │ ├── ShardDataTreeTransactionChain.java │ │ │ │ ├── ShardDataTreeTransactionParent.java │ │ │ │ ├── ShardRecoveryCoordinator.java │ │ │ │ ├── ShardSnapshotCohort.java │ │ │ │ ├── ShardStats.java │ │ │ │ ├── SimpleCommitCohort.java │ │ │ │ ├── StandaloneFrontendHistory.java │ │ │ │ ├── TerminationMonitor.java │ │ │ │ ├── TransactionType.java │ │ │ │ ├── actors │ │ │ │ ├── DataTreeNotificationListenerRegistrationActor.java │ │ │ │ └── JsonExportActor.java │ │ │ │ ├── config │ │ │ │ ├── AbstractModuleShardConfigProvider.java │ │ │ │ ├── Configuration.java │ │ │ │ ├── ConfigurationImpl.java │ │ │ │ ├── FileModuleShardConfigProvider.java │ │ │ │ ├── HybridModuleShardConfigProvider.java │ │ │ │ ├── ModuleConfig.java │ │ │ │ ├── ModuleShardConfigProvider.java │ │ │ │ ├── ModuleShardConfiguration.java │ │ │ │ └── ShardConfig.java │ │ │ │ ├── exceptions │ │ │ │ ├── AlreadyExistsException.java │ │ │ │ ├── LocalShardNotFoundException.java │ │ │ │ ├── NoShardLeaderException.java │ │ │ │ ├── NotInitializedException.java │ │ │ │ ├── PrimaryNotFoundException.java │ │ │ │ ├── ShardLeaderNotRespondingException.java │ │ │ │ ├── TimeoutException.java │ │ │ │ └── UnknownMessageException.java │ │ │ │ ├── identifiers │ │ │ │ └── ShardIdentifier.java │ │ │ │ ├── messages │ │ │ │ ├── ActorInitialized.java │ │ │ │ ├── AddShardReplica.java │ │ │ │ ├── ChangeShardMembersVotingStatus.java │ │ │ │ ├── CloseDataTreeNotificationListenerRegistration.java │ │ │ │ ├── CloseDataTreeNotificationListenerRegistrationReply.java │ │ │ │ ├── CreateShard.java │ │ │ │ ├── DataTreeChanged.java │ │ │ │ ├── DataTreeChangedReply.java │ │ │ │ ├── EnableNotification.java │ │ │ │ ├── FindLocalShard.java │ │ │ │ ├── FindPrimary.java │ │ │ │ ├── FlipShardMembersVotingStatus.java │ │ │ │ ├── GetInfo.java │ │ │ │ ├── GetKnownClients.java │ │ │ │ ├── GetKnownClientsReply.java │ │ │ │ ├── GetShardDataTree.java │ │ │ │ ├── GetShardRole.java │ │ │ │ ├── GetShardRoleReply.java │ │ │ │ ├── LocalPrimaryShardFound.java │ │ │ │ ├── LocalShardFound.java │ │ │ │ ├── LocalShardNotFound.java │ │ │ │ ├── MakeLeaderLocal.java │ │ │ │ ├── OnDemandShardState.java │ │ │ │ ├── OnInitialData.java │ │ │ │ ├── PeerAddressResolved.java │ │ │ │ ├── PrimaryShardInfo.java │ │ │ │ ├── RegisterDataTreeChangeListener.java │ │ │ │ ├── RegisterDataTreeNotificationListenerReply.java │ │ │ │ ├── RemoteFindPrimary.java │ │ │ │ ├── RemotePrimaryShardFound.java │ │ │ │ ├── RemoveShardReplica.java │ │ │ │ ├── SerializableMessage.java │ │ │ │ ├── ShardLeaderStateChanged.java │ │ │ │ └── UpdateSchemaContext.java │ │ │ │ ├── persisted │ │ │ │ ├── AT.java │ │ │ │ ├── AbortTransactionPayload.java │ │ │ │ ├── AbstractDataTreeCandidateNode.java │ │ │ │ ├── AbstractIdentifiablePayload.java │ │ │ │ ├── AbstractVersionException.java │ │ │ │ ├── AbstractVersionedShardDataTreeSnapshot.java │ │ │ │ ├── CH.java │ │ │ │ ├── CT.java │ │ │ │ ├── CloseLocalHistoryPayload.java │ │ │ │ ├── CommitTransactionPayload.java │ │ │ │ ├── CreateLocalHistoryPayload.java │ │ │ │ ├── DH.java │ │ │ │ ├── DS.java │ │ │ │ ├── DSS.java │ │ │ │ ├── DT.java │ │ │ │ ├── DataTreeCandidateInputOutput.java │ │ │ │ ├── DatastoreSnapshot.java │ │ │ │ ├── DatastoreSnapshotList.java │ │ │ │ ├── DeletedDataTreeCandidateNode.java │ │ │ │ ├── DisableTrackingPayload.java │ │ │ │ ├── FM.java │ │ │ │ ├── FrontendClientMetadata.java │ │ │ │ ├── FrontendHistoryMetadata.java │ │ │ │ ├── FrontendShardDataTreeSnapshotMetadata.java │ │ │ │ ├── FutureVersionException.java │ │ │ │ ├── MS.java │ │ │ │ ├── MetadataShardDataTreeSnapshot.java │ │ │ │ ├── ModifiedDataTreeCandidateNode.java │ │ │ │ ├── PH.java │ │ │ │ ├── PT.java │ │ │ │ ├── PastVersionException.java │ │ │ │ ├── PayloadVersion.java │ │ │ │ ├── PurgeLocalHistoryPayload.java │ │ │ │ ├── PurgeTransactionPayload.java │ │ │ │ ├── SM.java │ │ │ │ ├── SS.java │ │ │ │ ├── ST.java │ │ │ │ ├── ShardDataTreeSnapshot.java │ │ │ │ ├── ShardDataTreeSnapshotMetadata.java │ │ │ │ ├── ShardManagerSnapshot.java │ │ │ │ ├── ShardSnapshotState.java │ │ │ │ ├── SkipTransactionsPayload.java │ │ │ │ └── package-info.java │ │ │ │ ├── policy │ │ │ │ ├── TestOnlyRaftPolicy.java │ │ │ │ └── TwoNodeClusterRaftPolicy.java │ │ │ │ ├── shardmanager │ │ │ │ ├── AbstractShardManagerCreator.java │ │ │ │ ├── AtomicShardContextProvider.java │ │ │ │ ├── GetLocalShardIds.java │ │ │ │ ├── RegisterForShardAvailabilityChanges.java │ │ │ │ ├── ShardInformation.java │ │ │ │ ├── ShardManager.java │ │ │ │ ├── ShardManagerCreator.java │ │ │ │ ├── ShardManagerGetSnapshotReplyActor.java │ │ │ │ ├── ShardManagerIdentifier.java │ │ │ │ ├── ShardManagerInfo.java │ │ │ │ ├── ShardManagerInfoMBean.java │ │ │ │ ├── ShardPeerAddressResolver.java │ │ │ │ └── SwitchShardBehavior.java │ │ │ │ ├── shardstrategy │ │ │ │ ├── DefaultShardStrategy.java │ │ │ │ ├── ModuleShardStrategy.java │ │ │ │ ├── ShardStrategy.java │ │ │ │ └── ShardStrategyFactory.java │ │ │ │ └── utils │ │ │ │ ├── ActorUtils.java │ │ │ │ ├── CompositeOnComplete.java │ │ │ │ ├── DataTreeModificationOutput.java │ │ │ │ ├── NormalizedNodeAggregator.java │ │ │ │ ├── NormalizedNodeXMLOutput.java │ │ │ │ ├── PrimaryShardInfoFutureCache.java │ │ │ │ ├── PruningDataTreeModification.java │ │ │ │ └── RootScatterGather.java │ │ └── yang │ │ │ └── distributed-datastore-provider.yang │ │ ├── site │ │ └── asciidoc │ │ │ └── distributed-data-store.adoc │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ ├── cluster │ │ │ ├── databroker │ │ │ │ ├── ClientBackedDataStoreTest.java │ │ │ │ ├── ClientBackedReadTransactionTest.java │ │ │ │ ├── ClientBackedReadWriteTransactionTest.java │ │ │ │ ├── ClientBackedTransactionChainTest.java │ │ │ │ ├── ClientBackedTransactionTest.java │ │ │ │ ├── ClientBackedWriteTransactionTest.java │ │ │ │ ├── CommitStatsMXBeanImplTest.java │ │ │ │ ├── ConcurrentDOMDataBrokerTest.java │ │ │ │ ├── TestClientBackedDataStore.java │ │ │ │ └── actors │ │ │ │ │ └── dds │ │ │ │ │ ├── AbstractClientHandleTest.java │ │ │ │ │ ├── AbstractClientHistoryTest.java │ │ │ │ │ ├── AbstractDataStoreClientBehaviorTest.java │ │ │ │ │ ├── AbstractProxyTransactionTest.java │ │ │ │ │ ├── ClientLocalHistoryTest.java │ │ │ │ │ ├── ClientSnapshotTest.java │ │ │ │ │ ├── ClientTransactionCommitCohortTest.java │ │ │ │ │ ├── ClientTransactionTest.java │ │ │ │ │ ├── DirectTransactionCommitCohortTest.java │ │ │ │ │ ├── DistributedDataStoreClientBehaviorTest.java │ │ │ │ │ ├── EmptyTransactionCommitCohortTest.java │ │ │ │ │ ├── LocalProxyTransactionTest.java │ │ │ │ │ ├── LocalReadOnlyProxyTransactionTest.java │ │ │ │ │ ├── LocalReadWriteProxyTransactionTest.java │ │ │ │ │ ├── ModuleShardBackendResolverTest.java │ │ │ │ │ ├── RemoteProxyTransactionTest.java │ │ │ │ │ ├── SimpleDataStoreClientBehaviorTest.java │ │ │ │ │ ├── SingleClientHistoryTest.java │ │ │ │ │ ├── TestUtils.java │ │ │ │ │ ├── TransactionTester.java │ │ │ │ │ └── VotingFutureTest.java │ │ │ └── datastore │ │ │ │ ├── AbstractActorTest.java │ │ │ │ ├── AbstractClusterRefActorTest.java │ │ │ │ ├── AbstractDistributedDataStoreIntegrationTest.java │ │ │ │ ├── AbstractShardTest.java │ │ │ │ ├── AbstractTest.java │ │ │ │ ├── DataTreeChangeListenerActorTest.java │ │ │ │ ├── DataTreeChangeListenerProxyTest.java │ │ │ │ ├── DataTreeChangeListenerSupportTest.java │ │ │ │ ├── DataTreeCohortActorTest.java │ │ │ │ ├── DataTreeCohortIntegrationTest.java │ │ │ │ ├── DatastoreContextContextPropertiesUpdaterTest.java │ │ │ │ ├── DatastoreContextIntrospectorTest.java │ │ │ │ ├── DatastoreContextTest.java │ │ │ │ ├── DatastoreSnapshotRestoreTest.java │ │ │ │ ├── DistributedDataStoreIntegrationTest.java │ │ │ │ ├── DistributedDataStoreRemotingIntegrationTest.java │ │ │ │ ├── DistributedDataStoreWithSegmentedJournalIntegrationTest.java │ │ │ │ ├── ForwardingDataTreeChangeListenerTest.java │ │ │ │ ├── FrontendReadWriteTransactionTest.java │ │ │ │ ├── IntegrationTestKit.java │ │ │ │ ├── JsonExportTest.java │ │ │ │ ├── LocalShardStore.java │ │ │ │ ├── MemberNode.java │ │ │ │ ├── MockIdentifiers.java │ │ │ │ ├── RoleChangeNotifierTest.java │ │ │ │ ├── RootDataTreeChangeListenerProxyTest.java │ │ │ │ ├── ShardDataTreeMocking.java │ │ │ │ ├── ShardDataTreeTest.java │ │ │ │ ├── ShardRecoveryCoordinatorTest.java │ │ │ │ ├── ShardStatsTest.java │ │ │ │ ├── ShardTest.java │ │ │ │ ├── ShardTestBackendInfo.java │ │ │ │ ├── ShardTestConnection.java │ │ │ │ ├── ShardTestKit.java │ │ │ │ ├── SimpleShardDataTreeCohortTest.java │ │ │ │ ├── TestShard.java │ │ │ │ ├── actors │ │ │ │ └── DataTreeNotificationListenerRegistrationActorTest.java │ │ │ │ ├── config │ │ │ │ ├── ConfigurationImplBaseTest.java │ │ │ │ ├── ConfigurationImplFileTest.java │ │ │ │ ├── ConfigurationImplHybridTest.java │ │ │ │ ├── ConfigurationImplTest.java │ │ │ │ └── EmptyModuleShardConfigProvider.java │ │ │ │ ├── identifiers │ │ │ │ ├── ShardIdentifierTest.java │ │ │ │ └── ShardManagerIdentifierTest.java │ │ │ │ ├── persisted │ │ │ │ ├── AbortTransactionPayloadTest.java │ │ │ │ ├── AbstractIdentifiablePayloadTest.java │ │ │ │ ├── CloseLocalHistoryPayloadTest.java │ │ │ │ ├── CommitTransactionPayloadTest.java │ │ │ │ ├── CreateLocalHistoryPayloadTest.java │ │ │ │ ├── FrontendShardDataTreeSnapshotMetadataTest.java │ │ │ │ ├── PurgeLocalHistoryPayloadTest.java │ │ │ │ ├── PurgeTransactionPayloadTest.java │ │ │ │ ├── ShardDataTreeSnapshotTest.java │ │ │ │ ├── ShardManagerSnapshotTest.java │ │ │ │ ├── ShardSnapshotStateTest.java │ │ │ │ └── SkipTransactionsPayloadTest.java │ │ │ │ ├── shardmanager │ │ │ │ ├── ShardManagerGetSnapshotReplyActorTest.java │ │ │ │ ├── ShardManagerTest.java │ │ │ │ ├── ShardPeerAddressResolverTest.java │ │ │ │ └── TestShardManager.java │ │ │ │ ├── shardstrategy │ │ │ │ ├── DefaultShardStrategyTest.java │ │ │ │ ├── ModuleShardStrategyTest.java │ │ │ │ └── ShardStrategyFactoryTest.java │ │ │ │ └── utils │ │ │ │ ├── ActorUtilsTest.java │ │ │ │ ├── DispatchersTest.java │ │ │ │ ├── ForwardingActor.java │ │ │ │ ├── MockClusterWrapper.java │ │ │ │ ├── MockConfiguration.java │ │ │ │ ├── MockDataTreeChangeListener.java │ │ │ │ ├── NormalizedNodeAggregatorTest.java │ │ │ │ ├── PrimaryShardInfoFutureCacheTest.java │ │ │ │ └── PruningDataTreeModificationTest.java │ │ │ └── md │ │ │ └── cluster │ │ │ └── datastore │ │ │ └── model │ │ │ ├── CarsModel.java │ │ │ ├── CompositeModel.java │ │ │ ├── PeopleModel.java │ │ │ ├── SchemaContextHelper.java │ │ │ └── TestModel.java │ │ └── resources │ │ ├── application-with-custom-dispatchers.conf │ │ ├── application.conf │ │ ├── cars.yang │ │ ├── empty-modules.conf │ │ ├── expectedJournalExport.json │ │ ├── expectedSnapshotExport.json │ │ ├── module-shards-cars-member-1-and-2-and-3.conf │ │ ├── module-shards-cars-member-1-and-2.conf │ │ ├── module-shards-cars-member-1.conf │ │ ├── module-shards-default-5-node.conf │ │ ├── module-shards-default-cars-member1-and-2.conf │ │ ├── module-shards-default-cars-member1.conf │ │ ├── module-shards-default-member-1.conf │ │ ├── module-shards-default.conf │ │ ├── module-shards-member1-and-2-and-3.conf │ │ ├── module-shards-member1-and-2.conf │ │ ├── module-shards-member1.conf │ │ ├── module-shards-member2.conf │ │ ├── module-shards.conf │ │ ├── modules.conf │ │ ├── odl-datastore-augmentation.yang │ │ ├── odl-datastore-test-notification.yang │ │ ├── odl-datastore-test.yang │ │ ├── people.yang │ │ ├── segmented.conf │ │ └── simplelogger.properties │ ├── sal-dummy-distributed-datastore │ ├── README │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ └── dummy │ │ │ └── datastore │ │ │ ├── Configuration.java │ │ │ ├── DummyShard.java │ │ │ ├── DummyShardManager.java │ │ │ └── Main.java │ │ └── resources │ │ ├── member-2.conf │ │ ├── member-3.conf │ │ └── simplelogger.properties │ ├── sal-remoterpc-connector │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ └── remote │ │ │ └── rpc │ │ │ ├── AbstractRemoteFuture.java │ │ │ ├── AbstractRemoteImplementation.java │ │ │ ├── OSGiRemoteOpsProvider.java │ │ │ ├── OpsInvoker.java │ │ │ ├── OpsListener.java │ │ │ ├── OpsManager.java │ │ │ ├── OpsRegistrar.java │ │ │ ├── RemoteActionImplementation.java │ │ │ ├── RemoteDOMActionException.java │ │ │ ├── RemoteDOMActionFuture.java │ │ │ ├── RemoteDOMRpcException.java │ │ │ ├── RemoteDOMRpcFuture.java │ │ │ ├── RemoteOpsProvider.java │ │ │ ├── RemoteOpsProviderConfig.java │ │ │ ├── RemoteOpsProviderFactory.java │ │ │ ├── RemoteRpcImplementation.java │ │ │ ├── RpcErrorsException.java │ │ │ ├── TerminationMonitor.java │ │ │ ├── messages │ │ │ ├── AbstractExecute.java │ │ │ ├── AbstractResponse.java │ │ │ ├── ActionResponse.java │ │ │ ├── ExecuteAction.java │ │ │ ├── ExecuteRpc.java │ │ │ └── RpcResponse.java │ │ │ └── registry │ │ │ ├── AbstractRoutingTable.java │ │ │ ├── ActionRegistry.java │ │ │ ├── ActionRoutingTable.java │ │ │ ├── RoutingTable.java │ │ │ ├── RpcRegistry.java │ │ │ ├── gossip │ │ │ ├── Bucket.java │ │ │ ├── BucketData.java │ │ │ ├── BucketImpl.java │ │ │ ├── BucketStoreAccess.java │ │ │ ├── BucketStoreActor.java │ │ │ ├── GossipEnvelope.java │ │ │ ├── GossipStatus.java │ │ │ ├── Gossiper.java │ │ │ └── LocalBucket.java │ │ │ └── mbeans │ │ │ ├── AbstractRegistryMXBean.java │ │ │ ├── RemoteActionRegistryMXBean.java │ │ │ ├── RemoteActionRegistryMXBeanImpl.java │ │ │ ├── RemoteRpcRegistryMXBean.java │ │ │ └── RemoteRpcRegistryMXBeanImpl.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ └── remote │ │ │ └── rpc │ │ │ ├── AbstractOpsTest.java │ │ │ ├── OpsBrokerTest.java │ │ │ ├── OpsListenerTest.java │ │ │ ├── OpsRegistrarTest.java │ │ │ ├── RemoteOpsImplementationTest.java │ │ │ ├── RemoteOpsProviderConfigTest.java │ │ │ ├── RemoteOpsProviderFactoryTest.java │ │ │ ├── RemoteOpsProviderTest.java │ │ │ ├── RpcErrorsExceptionTest.java │ │ │ ├── messages │ │ │ ├── ExecuteOpsTest.java │ │ │ └── OpsResponseTest.java │ │ │ └── registry │ │ │ ├── ActionRegistryTest.java │ │ │ ├── RpcRegistryTest.java │ │ │ ├── gossip │ │ │ ├── BucketStoreTest.java │ │ │ └── GossiperTest.java │ │ │ └── mbeans │ │ │ ├── RemoteActionRegistryMXBeanImplTest.java │ │ │ └── RemoteRpcRegistryMXBeanImplTest.java │ │ └── resources │ │ ├── application.conf │ │ ├── simplelogger.properties │ │ └── test-rpc.yang │ ├── sal-test-model │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ └── md │ │ │ └── sal │ │ │ └── test │ │ │ └── model │ │ │ └── util │ │ │ └── ListsBindingUtils.java │ │ └── yang │ │ ├── opendaylight-listener-test.yang │ │ ├── opendaylight-mdsal-augment-test.yang │ │ ├── opendaylight-mdsal-list-test.yang │ │ ├── opendaylight-of-migration-test-model.yang │ │ ├── opendaylight-sal-test-store.yang │ │ ├── opendaylight-test-bug-2562.yang │ │ ├── opendaylight-test-bug-3090.yang │ │ ├── opendaylight-test-notification.yang │ │ ├── opendaylight-test-routed-rpc.yang │ │ └── opendaylight-test-rpc-service.yang │ └── samples │ ├── clustering-test-app │ ├── configuration │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── initial │ │ │ ├── module-shards.conf │ │ │ └── modules.conf │ ├── karaf-cli │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── org │ │ │ └── opendaylight │ │ │ └── clustering │ │ │ └── it │ │ │ └── karaf │ │ │ └── cli │ │ │ ├── AbstractDOMRpcAction.java │ │ │ ├── AbstractRpcAction.java │ │ │ ├── DefaultInstanceIdentifierSupport.java │ │ │ ├── InstanceIdentifierSupport.java │ │ │ ├── car │ │ │ ├── RegisterCommitCohortCommand.java │ │ │ ├── RegisterLoggingDtclCommand.java │ │ │ ├── RegisterOwnershipCommand.java │ │ │ ├── StopStressTestCommand.java │ │ │ ├── StressTestCommand.java │ │ │ ├── UnregisterCommitCohortCommand.java │ │ │ ├── UnregisterLoggingDtclsCommand.java │ │ │ ├── UnregisterOwnershipCommand.java │ │ │ └── purchase │ │ │ │ └── BuyCarCommand.java │ │ │ ├── odl │ │ │ └── mdsal │ │ │ │ └── lowlevel │ │ │ │ ├── control │ │ │ │ ├── AddShardReplicaCommand.java │ │ │ │ ├── CheckPublishNotificationsCommand.java │ │ │ │ ├── IsClientAbortedCommand.java │ │ │ │ ├── RegisterBoundConstantCommand.java │ │ │ │ ├── RegisterConstantCommand.java │ │ │ │ ├── RegisterDefaultConstantCommand.java │ │ │ │ ├── RegisterFlappingSingletonCommand.java │ │ │ │ ├── RegisterSingletonConstantCommand.java │ │ │ │ ├── RemoveShardReplicaCommand.java │ │ │ │ ├── ShutdownShardReplicaCommand.java │ │ │ │ ├── StartPublishNotificationsCommand.java │ │ │ │ ├── SubscribeDdtlCommand.java │ │ │ │ ├── SubscribeDtclCommand.java │ │ │ │ ├── SubscribeYnlCommand.java │ │ │ │ ├── UnregisterBoundConstantCommand.java │ │ │ │ ├── UnregisterConstantCommand.java │ │ │ │ ├── UnregisterDefaultConstantCommand.java │ │ │ │ ├── UnregisterFlappingSingletonCommand.java │ │ │ │ ├── UnregisterSingletonConstantCommand.java │ │ │ │ ├── UnsubscribeDdtlCommand.java │ │ │ │ ├── UnsubscribeDtclCommand.java │ │ │ │ ├── UnsubscribeYnlCommand.java │ │ │ │ └── WriteTransactionsCommand.java │ │ │ │ └── tgt │ │ │ │ ├── GetConstantCommand.java │ │ │ │ ├── GetContextedConstantCommand.java │ │ │ │ └── GetSingletonConstantCommand.java │ │ │ ├── people │ │ │ └── AddPersonCommand.java │ │ │ └── rpc │ │ │ └── test │ │ │ └── BasicGlobalCommand.java │ ├── model │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── yang │ │ │ ├── car-people.yang │ │ │ ├── car-purchase.yang │ │ │ ├── car.yang │ │ │ ├── odl-mdsal-lowlevel-common.yang │ │ │ ├── odl-mdsal-lowlevel-control.yang │ │ │ ├── odl-mdsal-lowlevel-target.yang │ │ │ ├── people.yang │ │ │ └── rpc-test.yang │ ├── pom.xml │ └── provider │ │ ├── pom.xml │ │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── opendaylight │ │ └── controller │ │ └── clustering │ │ └── it │ │ ├── listener │ │ └── CarBoughtListener.java │ │ └── provider │ │ ├── AddPersonImpl.java │ │ ├── BasicRpcTestProvider.java │ │ ├── CarDataTreeChangeListener.java │ │ ├── CarEntryDataTreeCommitCohort.java │ │ ├── CarProvider.java │ │ ├── MdsalLowLevelTestProvider.java │ │ └── impl │ │ ├── AbstractTransactionHandler.java │ │ ├── FlappingSingletonService.java │ │ ├── GetConstantService.java │ │ ├── IdIntsListener.java │ │ ├── PublishNotificationsTask.java │ │ ├── RoutedGetConstantService.java │ │ ├── SingletonGetConstantService.java │ │ ├── WriteTransactionsHandler.java │ │ └── YnlListener.java │ ├── pom.xml │ ├── toaster-consumer │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── opendaylight │ │ └── controller │ │ └── sample │ │ └── kitchen │ │ ├── api │ │ ├── EggsType.java │ │ ├── KitchenService.java │ │ └── KitchenServiceRuntimeMXBean.java │ │ └── impl │ │ └── KitchenServiceImpl.java │ ├── toaster-it │ ├── pom.xml │ └── src │ │ └── test │ │ └── java │ │ └── org │ │ └── opendaylight │ │ └── controller │ │ └── sample │ │ └── toaster │ │ └── it │ │ └── ToasterTest.java │ ├── toaster-provider │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── opendaylight │ │ │ └── controller │ │ │ └── sample │ │ │ └── toaster │ │ │ └── provider │ │ │ ├── OpendaylightToaster.java │ │ │ └── ToasterProviderRuntimeMXBean.java │ │ └── test │ │ └── java │ │ └── org │ │ └── opendaylight │ │ └── controller │ │ └── sample │ │ └── toaster │ │ └── provider │ │ └── OpenDaylightToasterTest.java │ └── toaster │ ├── pom.xml │ └── src │ └── main │ └── yang │ └── toaster.yang ├── pekko ├── pom.xml ├── repackaged-pekko-jar │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ ├── LICENSE │ │ ├── actor_reference.conf │ │ ├── actor_typed_reference.conf │ │ ├── cluster_reference.conf │ │ ├── cluster_tools_reference.conf │ │ ├── cluster_typed_reference.conf │ │ ├── distributed_data_reference.conf │ │ ├── persistence_reference.conf │ │ ├── reference.conf │ │ ├── remote_reference.conf │ │ └── stream_reference.conf └── repackaged-pekko │ └── pom.xml ├── pom.xml ├── raft ├── pom.xml ├── raft-api │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── module-info.java │ │ │ └── org │ │ │ └── opendaylight │ │ │ └── raft │ │ │ └── api │ │ │ ├── EIv1.java │ │ │ ├── EntryInfo.java │ │ │ ├── EntryMeta.java │ │ │ ├── RaftRole.java │ │ │ ├── ServerRole.java │ │ │ ├── TIv1.java │ │ │ ├── TermInfo.java │ │ │ └── package-info.java │ │ └── test │ │ └── java │ │ └── org │ │ └── opendaylight │ │ └── raft │ │ └── api │ │ └── TermInfoTest.java ├── raft-journal │ ├── LICENSE │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── module-info.java │ │ │ └── org │ │ │ └── opendaylight │ │ │ └── raft │ │ │ └── journal │ │ │ ├── DiskFileAccess.java │ │ │ ├── DiskFileReader.java │ │ │ ├── DiskFileWriter.java │ │ │ ├── EntryReader.java │ │ │ ├── EntryTooLargeException.java │ │ │ ├── EntryWriter.java │ │ │ ├── FileAccess.java │ │ │ ├── FileReader.java │ │ │ ├── FileWriter.java │ │ │ ├── FromByteBufMapper.java │ │ │ ├── MappedByteBuf.java │ │ │ ├── MappedFileAccess.java │ │ │ ├── MappedFileReader.java │ │ │ ├── MappedFileWriter.java │ │ │ ├── RaftJournal.java │ │ │ ├── Segment.java │ │ │ ├── SegmentDescriptor.java │ │ │ ├── SegmentEntry.java │ │ │ ├── SegmentFile.java │ │ │ ├── SegmentIndex.java │ │ │ ├── SegmentReader.java │ │ │ ├── SegmentWriter.java │ │ │ ├── SegmentedCommitsEntryReader.java │ │ │ ├── SegmentedEntryReader.java │ │ │ ├── SegmentedEntryWriter.java │ │ │ ├── SegmentedRaftJournal.java │ │ │ ├── SparseSegmentIndex.java │ │ │ ├── StorageExhaustedException.java │ │ │ ├── StorageLevel.java │ │ │ ├── ToByteBufMapper.java │ │ │ └── package-info.java │ │ └── test │ │ └── java │ │ └── org │ │ └── opendaylight │ │ └── raft │ │ └── journal │ │ ├── SegmentDescriptorTest.java │ │ ├── SegmentFileTest.java │ │ └── SparseSegmentIndexTest.java ├── raft-spi │ ├── bnd.bnd │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ ├── module-info.java │ │ │ └── org │ │ │ └── opendaylight │ │ │ └── raft │ │ │ └── spi │ │ │ ├── AbstractFileStreamSource.java │ │ │ ├── ByteArray.java │ │ │ ├── ChunkedByteArray.java │ │ │ ├── ChunkedInputStream.java │ │ │ ├── ChunkedOutputStream.java │ │ │ ├── CompressionType.java │ │ │ ├── FileBackedOutputStream.java │ │ │ ├── FileBackedOutputStreamFactory.java │ │ │ ├── FileStreamSource.java │ │ │ ├── InstallableSnapshot.java │ │ │ ├── InstallableSnapshotSource.java │ │ │ ├── Lz4BlockSize.java │ │ │ ├── Lz4SnapshotSource.java │ │ │ ├── Lz4Support.java │ │ │ ├── PlainSnapshotSource.java │ │ │ ├── SharedFileBackedOutputStream.java │ │ │ ├── SizedDecompressLz4.java │ │ │ ├── SizedStreamSource.java │ │ │ ├── SnapshotSource.java │ │ │ ├── StreamSource.java │ │ │ ├── TransientFile.java │ │ │ ├── TransientFileStreamSource.java │ │ │ ├── UnsizedDecompressLz4.java │ │ │ ├── UnsizedStreamSource.java │ │ │ ├── WrappedByteArray.java │ │ │ └── package-info.java │ │ └── test │ │ └── java │ │ └── org │ │ └── opendaylight │ │ └── raft │ │ └── spi │ │ ├── ChunkedOutputStreamTest.java │ │ ├── FileBackedOutputStreamTest.java │ │ ├── Lz4SupportTest.java │ │ └── SharedFileBackedOutputStreamTest.java └── sal-akka-raft │ ├── pom.xml │ └── src │ ├── main │ └── java │ │ ├── module-info.java │ │ └── org │ │ └── opendaylight │ │ └── controller │ │ └── cluster │ │ ├── notifications │ │ ├── DefaultLeaderStateChanged.java │ │ ├── ForwadingLeaderStateChanged.java │ │ ├── LeaderStateChanged.java │ │ ├── MemberNotication.java │ │ ├── RegisterRoleChangeListener.java │ │ ├── RegisterRoleChangeListenerReply.java │ │ ├── RoleChangeNotification.java │ │ ├── RoleChangeNotifier.java │ │ ├── RoleChanged.java │ │ └── package-info.java │ │ └── raft │ │ ├── AbstractReplicatedLog.java │ │ ├── ApplyEntryMethod.java │ │ ├── ClientRequestTracker.java │ │ ├── ConfigParams.java │ │ ├── DefaultConfigParamsImpl.java │ │ ├── FollowerLogInformation.java │ │ ├── JournaledLogEntry.java │ │ ├── LeadershipTransferFailedException.java │ │ ├── LocalAccess.java │ │ ├── NoopPeerAddressResolver.java │ │ ├── NoopRaftActorSnapshotCohort.java │ │ ├── PeerAddressResolver.java │ │ ├── PeerInfo.java │ │ ├── PeerInfos.java │ │ ├── PekkoRaftStorage.java │ │ ├── PekkoRecovery.java │ │ ├── PekkoRecoverySupport.java │ │ ├── PekkoReplicatedLog.java │ │ ├── PersistenceControl.java │ │ ├── PersistenceProvider.java │ │ ├── PropertiesTermInfoStore.java │ │ ├── RaftActor.java │ │ ├── RaftActorContext.java │ │ ├── RaftActorContextImpl.java │ │ ├── RaftActorLeadershipTransferCohort.java │ │ ├── RaftActorRecoveryCohort.java │ │ ├── RaftActorSnapshotCohort.java │ │ ├── RaftActorSnapshotMessageSupport.java │ │ ├── RaftActorVotingConfigSupport.java │ │ ├── RaftVersions.java │ │ ├── ReplicatedLog.java │ │ ├── ReplicatedLogEntry.java │ │ ├── ReplicatedLogImpl.java │ │ ├── SnapshotManager.java │ │ ├── TimedRunnable.java │ │ ├── VotingState.java │ │ ├── base │ │ └── messages │ │ │ ├── ApplyState.java │ │ │ ├── ElectionTimeout.java │ │ │ ├── FollowerInitialSyncUpStatus.java │ │ │ ├── InitiateCaptureSnapshot.java │ │ │ ├── LeaderTransitioning.java │ │ │ ├── Replicate.java │ │ │ ├── SwitchBehavior.java │ │ │ ├── TimeoutNow.java │ │ │ └── package-info.java │ │ ├── behaviors │ │ ├── AbstractLeader.java │ │ ├── Candidate.java │ │ ├── FI.java │ │ ├── Follower.java │ │ ├── FollowerIdentifier.java │ │ ├── IsolatedLeader.java │ │ ├── Leader.java │ │ ├── LeaderInstallSnapshotState.java │ │ ├── PreLeader.java │ │ ├── RaftActorBehavior.java │ │ ├── SnapshotTracker.java │ │ ├── SyncStatusTracker.java │ │ └── package-info.java │ │ ├── client │ │ └── messages │ │ │ ├── FindLeader.java │ │ │ ├── FindLeaderReply.java │ │ │ ├── GetOnDemandRaftState.java │ │ │ ├── GetSnapshot.java │ │ │ ├── GetSnapshotReply.java │ │ │ ├── OnDemandRaftState.java │ │ │ ├── Shutdown.java │ │ │ └── package-info.java │ │ ├── messages │ │ ├── AE.java │ │ ├── AR.java │ │ ├── AbstractServerChangeReply.java │ │ ├── AddServer.java │ │ ├── AddServerReply.java │ │ ├── AppendEntries.java │ │ ├── AppendEntriesReply.java │ │ ├── ChangeServersVotingStatus.java │ │ ├── IR.java │ │ ├── IS.java │ │ ├── IdentifiablePayload.java │ │ ├── InstallSnapshot.java │ │ ├── InstallSnapshotReply.java │ │ ├── Payload.java │ │ ├── RV.java │ │ ├── RaftRPC.java │ │ ├── RemoveServer.java │ │ ├── RemoveServerReply.java │ │ ├── RequestLeadership.java │ │ ├── RequestVote.java │ │ ├── RequestVoteReply.java │ │ ├── ServerChangeReply.java │ │ ├── ServerChangeStatus.java │ │ ├── ServerRemoved.java │ │ ├── UnInitializedFollowerSnapshotReply.java │ │ ├── VR.java │ │ └── package-info.java │ │ ├── package-info.java │ │ ├── persisted │ │ ├── AJE.java │ │ ├── ApplyJournalEntries.java │ │ ├── DE.java │ │ ├── DeleteEntries.java │ │ ├── EmptyState.java │ │ ├── LE.java │ │ ├── LegacySerializable.java │ │ ├── MigratedSerializable.java │ │ ├── NP.java │ │ ├── NoopPayload.java │ │ ├── PekkoPersistenceContract.java │ │ ├── SS.java │ │ ├── ServerConfigurationPayload.java │ │ ├── ServerInfo.java │ │ ├── SimpleReplicatedLogEntry.java │ │ ├── SimpleReplicatedLogEntrySerializer.java │ │ ├── Snapshot.java │ │ ├── UT.java │ │ ├── UpdateElectionTerm.java │ │ ├── VotingConfig.java │ │ └── package-info.java │ │ ├── policy │ │ ├── DefaultRaftPolicy.java │ │ ├── DisableElectionsRaftPolicy.java │ │ ├── RaftPolicy.java │ │ └── package-info.java │ │ └── spi │ │ ├── AbstractRaftCommand.java │ │ ├── AbstractStateCommand.java │ │ ├── DefaultLogEntry.java │ │ ├── DisabledRaftStorage.java │ │ ├── EnabledRaftStorage.java │ │ ├── EntryStore.java │ │ ├── ForwardingEntryStore.java │ │ ├── ForwardingSnapshotStore.java │ │ ├── ImmediateEntryStore.java │ │ ├── ImmutableUnsignedLongSet.java │ │ ├── LogEntry.java │ │ ├── MutableUnsignedLongSet.java │ │ ├── RaftCallback.java │ │ ├── RaftCommand.java │ │ ├── RaftSnapshot.java │ │ ├── RaftStorage.java │ │ ├── SnapshotFile.java │ │ ├── SnapshotFileFormat.java │ │ ├── SnapshotFileV1.java │ │ ├── SnapshotStore.java │ │ ├── StateCommand.java │ │ ├── StateMachineCommand.java │ │ ├── StateSnapshot.java │ │ ├── TermInfoStore.java │ │ ├── UncloseableBufferedOutputStream.java │ │ ├── UnsignedLongBitmap.java │ │ ├── UnsignedLongSet.java │ │ └── package-info.java │ └── test │ ├── java │ └── org │ │ └── opendaylight │ │ └── controller │ │ └── cluster │ │ └── raft │ │ ├── AbstractActorTest.java │ │ ├── AbstractRaftActorIntegrationTest.java │ │ ├── AbstractRaftActorTest.java │ │ ├── AbstractReplicatedLogTest.java │ │ ├── CapturingSnapshotStore.java │ │ ├── DefaultConfigParamsImplTest.java │ │ ├── DoNothingActor.java │ │ ├── EchoActor.java │ │ ├── FollowerLogInformationTest.java │ │ ├── ForwardMessageToBehaviorActor.java │ │ ├── ImmediateSnapshotStore.java │ │ ├── InMemoryJournal.java │ │ ├── InMemorySnapshotStore.java │ │ ├── IsolationScenarioTest.java │ │ ├── LeadershipTransferIntegrationTest.java │ │ ├── MessageCollectorActor.java │ │ ├── MigratedMessagesTest.java │ │ ├── MockCommand.java │ │ ├── MockCommandProxy.java │ │ ├── MockRaftActor.java │ │ ├── MockRaftActorContext.java │ │ ├── MockRaftActorSnapshotCohort.java │ │ ├── MockReplicatedLog.java │ │ ├── MockSnapshotState.java │ │ ├── NonVotingFollowerIntegrationTest.java │ │ ├── PersistenceControlTest.java │ │ ├── PreLeaderScenarioTest.java │ │ ├── PropertiesTermInfoStoreTest.java │ │ ├── RaftActorContextImplTest.java │ │ ├── RaftActorLeadershipTransferCohortTest.java │ │ ├── RaftActorRecoveryTest.java │ │ ├── RaftActorSnapshotMessageSupportTest.java │ │ ├── RaftActorTest.java │ │ ├── RaftActorTestKit.java │ │ ├── RaftActorVotingConfigSupportTest.java │ │ ├── RecoveryIntegrationSingleNodeTest.java │ │ ├── RecoveryIntegrationTest.java │ │ ├── ReplicatedLogImplTest.java │ │ ├── ReplicationAndSnapshotsIntegrationTest.java │ │ ├── ReplicationAndSnapshotsWithLaggingFollowerIntegrationTest.java │ │ ├── ReplicationWithSlicedPayloadIntegrationTest.java │ │ ├── SnapshotManagerTest.java │ │ ├── TestActorFactory.java │ │ ├── TestPersistenceProvider.java │ │ ├── base │ │ └── messages │ │ │ └── TimeoutNowTest.java │ │ ├── behaviors │ │ ├── AbstractLeaderElectionScenarioTest.java │ │ ├── AbstractLeaderTest.java │ │ ├── AbstractRaftActorBehaviorTest.java │ │ ├── CandidateTest.java │ │ ├── DelayedMessagesElectionScenarioTest.java │ │ ├── FollowerIdentifierTest.java │ │ ├── FollowerTest.java │ │ ├── IsolatedLeaderTest.java │ │ ├── LeaderInstallSnapshotStateTest.java │ │ ├── LeaderTest.java │ │ ├── PartitionedCandidateOnStartupElectionScenarioTest.java │ │ ├── PartitionedLeadersElectionScenarioTest.java │ │ ├── SnapshotTrackerTest.java │ │ └── SyncStatusTrackerTest.java │ │ ├── client │ │ └── messages │ │ │ └── ShutdownTest.java │ │ ├── messages │ │ ├── AppendEntriesReplyTest.java │ │ ├── AppendEntriesTest.java │ │ ├── InstallSnapshotReplyTest.java │ │ ├── InstallSnapshotTest.java │ │ ├── RequestVoteReplyTest.java │ │ └── RequestVoteTest.java │ │ ├── persisted │ │ ├── ApplyJournalEntriesTest.java │ │ ├── ByteState.java │ │ ├── ByteStateSnapshotCohort.java │ │ ├── DeleteEntriesTest.java │ │ ├── EmptyStateTest.java │ │ ├── NoopPayloadTest.java │ │ ├── ServerConfigurationPayloadTest.java │ │ ├── SimpleReplicatedLogEntrySerializerTest.java │ │ ├── SimpleReplicatedLogEntryTest.java │ │ ├── SnapshotTest.java │ │ └── UpdateElectionTermTest.java │ │ ├── policy │ │ └── TestRaftPolicy.java │ │ └── spi │ │ ├── AbstractTermInfoStore.java │ │ ├── FailingTermInfoStore.java │ │ ├── SnapshotFileFormatTest.java │ │ ├── TestTermInfoStore.java │ │ ├── UnsignedLongBitmapTest.java │ │ └── UnsignedLongSetTest.java │ ├── notifications │ └── RoleChangeNotifierTest.java │ └── resources │ ├── application.conf │ ├── helium-serialized-ReplicatedLogImplEntry │ ├── lithium-serialized-Snapshot │ └── simplelogger.properties └── tox.ini /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | **/target 3 | bin/ 4 | dist 5 | **/logs 6 | products 7 | repository 8 | workspace 9 | *~ 10 | target 11 | target-ide 12 | .classpath 13 | .project 14 | .settings 15 | opendaylight/northbound/integrationtest/logs/* 16 | *.ipr 17 | *.iml 18 | *.iws 19 | .idea 20 | xtend-gen 21 | yang-gen-config 22 | yang-gen-sal 23 | classes 24 | out/ 25 | .externalToolBuilders 26 | maven-eclipse.xml 27 | .DS_STORE 28 | .metadata 29 | opendaylight/md-sal/sal-distributed-datastore/journal 30 | !opendaylight/distribution/opendaylight-karaf-resources/src/main/resources/bin 31 | .checkstyle 32 | .factorypath 33 | maven-metadata-local.xml 34 | .fbExcludeFilterFile 35 | META-INF 36 | 37 | # Sphinx documentation 38 | .tox/ 39 | docs/_build/ 40 | 41 | -------------------------------------------------------------------------------- /.gitreview: -------------------------------------------------------------------------------- 1 | [gerrit] 2 | host=git.opendaylight.org 3 | port=29418 4 | project=controller.git 5 | defaultbranch=master 6 | -------------------------------------------------------------------------------- /.mvn/jvm.config: -------------------------------------------------------------------------------- 1 | -Xmx4096m 2 | -------------------------------------------------------------------------------- /.mvn/maven.config: -------------------------------------------------------------------------------- 1 | -Dmaven.compile.fork=true 2 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | # .readthedocs.yml 2 | # Read the Docs configuration file 3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 4 | 5 | # Required 6 | version: 2 7 | 8 | build: 9 | os: ubuntu-22.04 10 | tools: 11 | python: "3.11" 12 | jobs: 13 | post_checkout: 14 | - git fetch --unshallow || true 15 | 16 | sphinx: 17 | configuration: docs/conf.py 18 | 19 | python: 20 | install: 21 | - requirements: docs/requirements.txt 22 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Cisco Systems, Inc. wishes to acknowledge the seminal and leading work of David Erickson. 2 | David's implementation of Beacon was one of the first open-source network controllers. 3 | The OpenDaylight Project would not exist were it not for David's intellectual and 4 | architectural contribution and his inspiration lives on in the OpenDaylight code base today. 5 | -------------------------------------------------------------------------------- /atomix-storage/src/main/java/io/atomix/storage/journal/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-2022 Open Networking Foundation and others. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Provides a low-level journal abstraction for appending to logs and managing segmented logs. 19 | */ 20 | @Deprecated(since = "11.0.0", forRemoval = true) 21 | package io.atomix.storage.journal; 22 | -------------------------------------------------------------------------------- /atomix-storage/src/main/java/io/atomix/utils/serializer/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-2022 Open Networking Foundation and others. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Provides classes and interfaces for binary serialization. 18 | */ 19 | @Deprecated(since = "11.0.0", forRemoval = true) 20 | package io.atomix.utils.serializer; 21 | -------------------------------------------------------------------------------- /benchmark/api/src/main/yang/ntfbench-payload.yang: -------------------------------------------------------------------------------- 1 | module ntfbench-payload { 2 | yang-version 1; 3 | namespace "urn:opendaylight:params:xml:ns:yang:ntfbench-payload"; 4 | prefix "ntfbenchmark"; 5 | 6 | description 7 | "Copyright © 2015, 2018 Cisco Systems, Inc. and others. 8 | 9 | This program and the accompanying materials are made available under the 10 | terms of the Eclipse Public License v1.0 which accompanies this distribution, 11 | and is available at http://www.eclipse.org/legal/epl-v10.html"; 12 | 13 | revision "2015-07-09" { 14 | description "Initial revision of ntfbenchmark model"; 15 | } 16 | 17 | grouping payload { 18 | list payload { 19 | description 20 | "The payload for the notification"; 21 | key id; 22 | leaf id { 23 | type int32; 24 | } 25 | } 26 | } 27 | 28 | notification ntfbench { 29 | uses payload; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /benchmark/rpcbenchmark/src/main/java/rpcbenchmark/impl/RTCClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Cisco Systems and others. All rights reserved. 3 | * 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 7 | */ 8 | package rpcbenchmark.impl; 9 | 10 | public interface RTCClient { 11 | long getRpcOk(); 12 | 13 | long getRpcError(); 14 | 15 | void runTest(int iterations); 16 | 17 | void close(); 18 | } 19 | -------------------------------------------------------------------------------- /benchmark/segjournal-benchmark/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /bnd-parent/bnd.bnd: -------------------------------------------------------------------------------- 1 | -noextraheaders: true 2 | Bundle-DocURL: https://github.com/opendaylight/controller/ 3 | Bundle-SymbolicName: ${project.groupId}.${project.artifactId} 4 | -------------------------------------------------------------------------------- /docs/_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendaylight/controller/ab5495df8a77754d55842c47fd5ecbda0b8b0127/docs/_static/logo.png -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | # SPDX-License-Identifier: EPL-1.0 4 | ############################################################################## 5 | # Copyright (c) 2018 The Linux Foundation and others. 6 | # 7 | # All rights reserved. This program and the accompanying materials 8 | # are made available under the terms of the Eclipse Public License v1.0 9 | # which accompanies this distribution, and is available at 10 | # http://www.eclipse.org/legal/epl-v10.html 11 | ############################################################################## 12 | 13 | import xml.etree.ElementTree as ET 14 | 15 | from docs_conf.conf import * 16 | 17 | data = ET.parse('pom.xml') 18 | project_version = data.getroot().find('./{http://maven.apache.org/POM/4.0.0}version').text 19 | version = project_version 20 | release = project_version 21 | -------------------------------------------------------------------------------- /docs/conf.yaml: -------------------------------------------------------------------------------- 1 | project_cfg: opendaylight 2 | project: Controller 3 | -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendaylight/controller/ab5495df8a77754d55842c47fd5ecbda0b8b0127/docs/favicon.ico -------------------------------------------------------------------------------- /docs/images/Get.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendaylight/controller/ab5495df8a77754d55842c47fd5ecbda0b8b0127/docs/images/Get.png -------------------------------------------------------------------------------- /docs/images/Put.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendaylight/controller/ab5495df8a77754d55842c47fd5ecbda0b8b0127/docs/images/Put.png -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. _controller: 2 | 3 | ######################## 4 | Controller Documentation 5 | ######################## 6 | 7 | .. toctree:: 8 | :maxdepth: 1 9 | 10 | dev-guide.rst 11 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | lfdocs-conf 2 | -------------------------------------------------------------------------------- /features/odl-clustering-test-app/src/main/feature/feature.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | odl-mdsal-model-rfc6991 12 | 13 | 14 | -------------------------------------------------------------------------------- /features/odl-controller-akka/src/main/history/dependencies.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | odl-controller-scala 5 | mvn:com.typesafe/config/1.4.3 6 | mvn:com.typesafe/ssl-config-core_2.13/0.6.1 7 | mvn:io.aeron/aeron-client/1.38.1 8 | mvn:io.aeron/aeron-driver/1.38.1 9 | mvn:org.agrona/agrona/1.15.2 10 | mvn:org.opendaylight.controller/repackaged-pekko/${project.version} 11 | mvn:org.reactivestreams/reactive-streams/1.0.4 12 | wrap 13 | wrap:mvn:org.lmdbjava/lmdbjava/0.7.0 14 | 15 | 16 | -------------------------------------------------------------------------------- /features/odl-controller-blueprint/src/main/feature/feature.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | odl-yangtools-codec 12 | odl-mdsal-binding-api 13 | odl-mdsal-binding-runtime 14 | odl-mdsal-dom-api 15 | mvn:org.opendaylight.controller/blueprint/${project.version} 16 | 17 | 18 | -------------------------------------------------------------------------------- /features/odl-controller-broker-local/src/main/feature/feature.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | odl-mdsal-dom 12 | odl-mdsal-eos-binding 13 | odl-mdsal-eos-dom 14 | odl-mdsal-singleton-dom 15 | 16 | 17 | -------------------------------------------------------------------------------- /features/odl-controller-mdsal-common/src/main/feature/feature.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | odl-mdsal-common 12 | odl-mdsal-binding-runtime 13 | 14 | 15 | -------------------------------------------------------------------------------- /features/odl-controller-scala/src/main/history/dependencies.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | mvn:org.scala-lang.modules/scala-parser-combinators_2.13/1.1.2 5 | mvn:org.scala-lang/scala-library/2.13.16 6 | mvn:org.scala-lang/scala-reflect/2.13.16 7 | 8 | 9 | -------------------------------------------------------------------------------- /features/odl-jolokia/src/main/feature/feature.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | mvn:org.opendaylight.controller/odl-jolokia-osgi/${project.version}/cfg/configuration 12 | http 13 | 14 | 15 | -------------------------------------------------------------------------------- /features/odl-lz4/src/main/feature/template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | mvn:org.lz4/lz4-java/{{versionAsInProject}} 5 | 6 | 7 | -------------------------------------------------------------------------------- /features/odl-mdsal-broker/src/main/feature/feature.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | odl-mdsal-singleton-dom 12 | odl-mdsal-eos-binding 13 | 14 | 15 | -------------------------------------------------------------------------------- /features/odl-mdsal-clustering-commons/src/main/feature/feature.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | odl-apache-commons-lang3 12 | odl-dropwizard-metrics 13 | odl-netty-4 14 | odl-servlet-api 15 | odl-yangtools-data 16 | odl-yangtools-codec 17 | 18 | 19 | -------------------------------------------------------------------------------- /features/odl-raft-api/src/main/feature/template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | mvn:org.opendaylight.controller/raft-api/{{versionAsInProject}} 5 | 6 | 7 | -------------------------------------------------------------------------------- /features/odl-raft-spi/src/main/feature/template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | mvn:org.opendaylight.odlparent/odl-guava/{{versionAsInProject}}/xml/features 4 | mvn:org.opendaylight.controller/odl-lz4/{{versionAsInProject}}/xml/features 5 | mvn:org.opendaylight.controller/odl-raft-api/{{versionAsInProject}}/xml/features 6 | 7 | odl-guava 8 | odl-lz4 9 | odl-raft-api 10 | mvn:org.opendaylight.controller/raft-spi/{{versionAsInProject}} 11 | 12 | 13 | -------------------------------------------------------------------------------- /features/odl-toaster/src/main/feature/feature.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | odl-mdsal-binding-runtime 12 | 13 | 14 | -------------------------------------------------------------------------------- /jolokia/src/main/resources/org.jolokia.osgi.cfg: -------------------------------------------------------------------------------- 1 | #ODL Default Jolokia Configuration File 2 | 3 | # The default strategy is to use "service-all", which requires AAA to be installed to access 4 | # Jolokia REST endpoints at runtime. AAA is responsible for creating and registering the 5 | # Authenticator service with the OSGi service registry. 6 | org.jolokia.authMode=service-all 7 | 8 | # The below may be uncommented by the operator to enable basic authentication for Jolokia. Prior 9 | # to the Oxygen release, only basic authentication was available. This is provided to show how 10 | # backwards compatibility can be achieved. 11 | #org.jolokia.authMode=basic 12 | #org.jolokia.user=admin 13 | #org.jolokia.password=admin 14 | -------------------------------------------------------------------------------- /opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/ConfigXMLReaderException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.blueprint.ext; 9 | 10 | /** 11 | * Exception thrown by {@link DataStoreAppConfigDefaultXMLReader}. 12 | * 13 | * @author Michael Vorburger.ch 14 | */ 15 | public class ConfigXMLReaderException extends Exception { 16 | private static final long serialVersionUID = 1L; 17 | 18 | public ConfigXMLReaderException(final String message) { 19 | super(message); 20 | } 21 | 22 | public ConfigXMLReaderException(final String message, final Throwable cause) { 23 | super(message, cause); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/UpdateStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.blueprint.ext; 9 | 10 | /** 11 | * Enumerates possible strategies when a component is updated. 12 | * 13 | * @author Vishal Thapar 14 | */ 15 | public enum UpdateStrategy { 16 | /* 17 | * Restart container 18 | */ 19 | RELOAD, 20 | /* 21 | * Don't do anything 22 | */ 23 | NONE 24 | } 25 | -------------------------------------------------------------------------------- /opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | @org.osgi.annotation.bundle.Export 9 | package org.opendaylight.controller.blueprint; 10 | -------------------------------------------------------------------------------- /opendaylight/blueprint/src/test/resources/opendaylight-sal-test-store-config.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | someName 12 | someValue 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/FutureVersionException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.access; 9 | 10 | /** 11 | * Exception thrown from {@link ABIVersion#valueOf(short)} when the specified version is too new to be supported 12 | * by the codebase. 13 | */ 14 | public final class FutureVersionException extends AbstractVersionException { 15 | @java.io.Serial 16 | private static final long serialVersionUID = 1L; 17 | 18 | FutureVersionException(final short version, final ABIVersion closest) { 19 | super("Version " + Short.toUnsignedInt(version) + " is too new", version, closest); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/PastVersionException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.access; 9 | 10 | /** 11 | * Exception thrown from {@link ABIVersion#valueOf(short)} when the specified version is too old and no longer 12 | * supported by the codebase. 13 | */ 14 | public final class PastVersionException extends AbstractVersionException { 15 | @java.io.Serial 16 | private static final long serialVersionUID = 1L; 17 | 18 | PastVersionException(final short version, final ABIVersion closest) { 19 | super("Version " + Short.toUnsignedInt(version) + " is too old", version, closest); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/commands/TransactionDelete.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.access.commands; 9 | 10 | import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; 11 | 12 | /** 13 | * Delete a particular path. 14 | */ 15 | public final class TransactionDelete extends TransactionModification { 16 | public TransactionDelete(final YangInstanceIdentifier path) { 17 | super(path); 18 | } 19 | 20 | @Override 21 | byte getType() { 22 | return TYPE_DELETE; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/commands/TransactionMerge.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.access.commands; 9 | 10 | import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; 11 | import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; 12 | 13 | /** 14 | * Merge a {@link NormalizedNode} tree onto a specific path. 15 | */ 16 | public final class TransactionMerge extends TransactionDataModification { 17 | public TransactionMerge(final YangInstanceIdentifier path, final NormalizedNode data) { 18 | super(path, data); 19 | } 20 | 21 | @Override 22 | byte getType() { 23 | return TYPE_MERGE; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/commands/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | /** 9 | * This package defines the messages used to interact with the CDS backend implementation. 10 | */ 11 | package org.opendaylight.controller.cluster.access.commands; 12 | -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/concepts/FailureEnvelope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.access.concepts; 9 | 10 | public final class FailureEnvelope extends ResponseEnvelope> { 11 | @java.io.Serial 12 | private static final long serialVersionUID = 1L; 13 | 14 | public FailureEnvelope(final RequestFailure message, final long sessionId, final long txSequence, 15 | final long executionTimeNanos) { 16 | super(message, sessionId, txSequence, executionTimeNanos); 17 | } 18 | 19 | @Override 20 | FE createProxy() { 21 | return new FE(this); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/concepts/SliceableMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Inocybe Technologies and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.access.concepts; 9 | 10 | /** 11 | * A tagging interface that specifies a message whose serialized size can be large and thus should be sliced into 12 | * smaller chunks when transporting over the wire. 13 | * 14 | * @author Thomas Pantelis 15 | */ 16 | public interface SliceableMessage { 17 | // Marker interface 18 | } 19 | -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/concepts/SuccessEnvelope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.access.concepts; 9 | 10 | public final class SuccessEnvelope extends ResponseEnvelope> { 11 | @java.io.Serial 12 | private static final long serialVersionUID = 1L; 13 | 14 | public SuccessEnvelope(final RequestSuccess message, final long sessionId, final long txSequence, 15 | final long executionTimeNanos) { 16 | super(message, sessionId, txSequence, executionTimeNanos); 17 | } 18 | 19 | @Override 20 | SE createProxy() { 21 | return new SE(this); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/concepts/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | /** 9 | * This package defines basic concepts used to interact with the CDS backend implementation. 10 | * 11 | * @author Robert Varga 12 | */ 13 | package org.opendaylight.controller.cluster.access.concepts; 14 | -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | /** 9 | * This package contains the base definitions of the APIs exposed by the clustered data store backend. 10 | * 11 | * @author Robert Varga 12 | */ 13 | package org.opendaylight.controller.cluster.access; -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/AbstractTransactionSuccessTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Pantheon Technologies s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.access.commands; 9 | 10 | import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier; 11 | 12 | public abstract class AbstractTransactionSuccessTest> 13 | extends AbstractRequestSuccessTest { 14 | protected static final TransactionIdentifier TRANSACTION_IDENTIFIER = new TransactionIdentifier(HISTORY_IDENTIFIER, 15 | 0); 16 | 17 | protected AbstractTransactionSuccessTest(final T object, final int expectedSize) { 18 | super(object, expectedSize); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/concepts/RequestExceptionTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Pantheon Technologies s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.access.concepts; 9 | 10 | import org.junit.Test; 11 | 12 | public abstract class RequestExceptionTest { 13 | 14 | protected abstract void isRetriable(); 15 | 16 | protected abstract void checkMessage(); 17 | 18 | @Test 19 | public void testIsRetriable() { 20 | isRetriable(); 21 | } 22 | 23 | @Test 24 | public void testExceptionMessage() { 25 | checkMessage(); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/RequestCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.access.client; 9 | 10 | import org.eclipse.jdt.annotation.NonNull; 11 | import org.eclipse.jdt.annotation.Nullable; 12 | import org.opendaylight.controller.cluster.access.concepts.Response; 13 | 14 | @FunctionalInterface 15 | interface RequestCallback { 16 | /** 17 | * Invoked when a particular request completes. 18 | * 19 | * @param response Response to the request 20 | * @return Next client actor behavior 21 | */ 22 | @Nullable ClientActorBehavior complete(@NonNull Response response); 23 | } 24 | -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/RequestTimeoutException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Pantheon Technologies, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.access.client; 9 | 10 | import org.opendaylight.controller.cluster.access.concepts.RequestException; 11 | 12 | public final class RequestTimeoutException extends RequestException { 13 | private static final long serialVersionUID = 1L; 14 | 15 | public RequestTimeoutException(final String message) { 16 | super(message); 17 | } 18 | 19 | @Override 20 | public boolean isRetriable() { 21 | return false; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | /** 9 | * This package contains the baseline client infrastructure required to implement clients accessing the data store. 10 | * 11 | * @author Robert Varga 12 | */ 13 | package org.opendaylight.controller.cluster.access.client; -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-access-client/src/test/resources/application.conf: -------------------------------------------------------------------------------- 1 | pekko { 2 | persistence.snapshot-store.plugin = "in-memory-snapshot-store" 3 | persistence.journal.plugin = "in-memory-journal" 4 | 5 | loggers = ["org.apache.pekko.testkit.TestEventListener", "org.apache.pekko.event.slf4j.Slf4jLogger"] 6 | } 7 | 8 | in-memory-journal { 9 | class = "org.apache.pekko.persistence.journal.inmem.InmemJournal" 10 | } 11 | 12 | in-memory-snapshot-store { 13 | # Class name of the plugin. 14 | class = "org.opendaylight.controller.cluster.access.client.MockedSnapshotStore" 15 | # Dispatcher for the plugin actor. 16 | plugin-dispatcher = "pekko.persistence.dispatchers.default-plugin-dispatcher" 17 | } -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-dom-api/src/main/java/org/opendaylight/controller/cluster/dom/api/LeaderLocationListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.dom.api; 9 | 10 | import org.eclipse.jdt.annotation.NonNull; 11 | 12 | /** 13 | * Listener for shard leader location changes. 14 | */ 15 | public interface LeaderLocationListener { 16 | /** 17 | * Invoked when shard leader location changes. 18 | * 19 | * @param location Current leader location as known by the local node. 20 | */ 21 | void onLeaderLocationChanged(@NonNull LeaderLocation location); 22 | } 23 | -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-dom-api/src/main/java/org/opendaylight/controller/cluster/dom/api/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | /** 9 | * This package defines extensions to org.opendaylight.mdsal.dom.api specific 10 | * to Clustered Datastore implementation. 11 | */ 12 | package org.opendaylight.controller.cluster.dom.api; 13 | -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-mgmt-api/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | module org.opendaylight.controller.cluster.mgmt.api { 9 | exports org.opendaylight.controller.cluster.mgmt.api; 10 | // FIXME: 12.0.0: collapse this to something more reasonable, like 'raft.server', 'raft.datastore' or somesuch 11 | exports org.opendaylight.controller.cluster.datastore.jmx.mbeans; 12 | exports org.opendaylight.controller.cluster.datastore.jmx.mbeans.shard; 13 | 14 | // Annotation-only dependencies 15 | requires static transitive java.management; 16 | requires static transitive org.eclipse.jdt.annotation; 17 | requires static transitive org.opendaylight.raft.api; 18 | } 19 | -------------------------------------------------------------------------------- /opendaylight/md-sal/cds-mgmt-api/src/main/java/org/opendaylight/controller/cluster/datastore/jmx/mbeans/shard/ShardDataTreeListenerInfoMXBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Inocybe Technologies and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.jmx.mbeans.shard; 9 | 10 | import java.util.List; 11 | import javax.management.MXBean; 12 | import org.eclipse.jdt.annotation.NonNullByDefault; 13 | import org.opendaylight.controller.cluster.mgmt.api.DataTreeListenerInfo; 14 | 15 | /** 16 | * MXBean interface for reporting shard data tree change listener information. 17 | * 18 | * @author Thomas Pantelis 19 | */ 20 | @MXBean 21 | @NonNullByDefault 22 | public interface ShardDataTreeListenerInfoMXBean { 23 | 24 | List getDataTreeChangeListenerInfo(); 25 | } 26 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/bootstrap/command/BootstrapCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.bootstrap.command; 9 | 10 | public abstract class BootstrapCommand { 11 | BootstrapCommand() { 12 | // Hidden on purpose 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/bootstrap/command/GetRunningContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.bootstrap.command; 9 | 10 | import static java.util.Objects.requireNonNull; 11 | 12 | import org.apache.pekko.actor.typed.ActorRef; 13 | 14 | public final class GetRunningContext extends BootstrapCommand { 15 | private final ActorRef replyTo; 16 | 17 | public GetRunningContext(final ActorRef replyTo) { 18 | this.replyTo = requireNonNull(replyTo); 19 | } 20 | 21 | public ActorRef getReplyTo() { 22 | return replyTo; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/checker/command/GetEntitiesRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.owner.checker.command; 9 | 10 | import org.apache.pekko.actor.typed.ActorRef; 11 | 12 | public final class GetEntitiesRequest extends StateCheckerRequest { 13 | private static final long serialVersionUID = 1L; 14 | 15 | public GetEntitiesRequest(final ActorRef replyTo) { 16 | super(replyTo); 17 | } 18 | 19 | @Override 20 | public String toString() { 21 | return "GetEntitiesRequest{} " + super.toString(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/checker/command/GetEntityOwnerRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.owner.checker.command; 9 | 10 | import org.apache.pekko.actor.typed.ActorRef; 11 | import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.entity.owners.norev.EntityId; 12 | 13 | public final class GetEntityOwnerRequest extends AbstractEntityRequest { 14 | private static final long serialVersionUID = 1L; 15 | 16 | public GetEntityOwnerRequest(final ActorRef replyTo, final EntityId entity) { 17 | super(replyTo, entity); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/checker/command/GetEntityRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.owner.checker.command; 9 | 10 | import org.apache.pekko.actor.typed.ActorRef; 11 | import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.entity.owners.norev.EntityId; 12 | 13 | public final class GetEntityRequest extends AbstractEntityRequest { 14 | private static final long serialVersionUID = 1L; 15 | 16 | public GetEntityRequest(final ActorRef replyTo, final EntityId entity) { 17 | super(replyTo, entity); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/checker/command/StateCheckerCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.owner.checker.command; 9 | 10 | public abstract class StateCheckerCommand { 11 | StateCheckerCommand() { 12 | // Hidden on purpose 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/checker/command/StateCheckerReply.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.owner.checker.command; 9 | 10 | public abstract class StateCheckerReply { 11 | StateCheckerReply() { 12 | // Hidden on purpose 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/supervisor/command/ClearCandidatesResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.owner.supervisor.command; 9 | 10 | import java.io.Serializable; 11 | 12 | /** 13 | * Response sent from OwnerSupervisor to the ClearCandidatesForMember request, notifying the caller that removal has 14 | * finished. 15 | */ 16 | public class ClearCandidatesResponse implements Serializable { 17 | 18 | private static final long serialVersionUID = 1L; 19 | } 20 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/supervisor/command/DataCenterActivated.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.owner.supervisor.command; 9 | 10 | import java.io.Serializable; 11 | 12 | public final class DataCenterActivated extends OwnerSupervisorReply implements Serializable { 13 | private static final long serialVersionUID = 1L; 14 | public static final DataCenterActivated INSTANCE = new DataCenterActivated(); 15 | 16 | private DataCenterActivated() { 17 | // NOOP 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/supervisor/command/DataCenterDeactivated.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.owner.supervisor.command; 9 | 10 | import java.io.Serializable; 11 | 12 | public final class DataCenterDeactivated extends OwnerSupervisorReply implements Serializable { 13 | private static final long serialVersionUID = 1L; 14 | public static final DataCenterDeactivated INSTANCE = new DataCenterDeactivated(); 15 | 16 | private DataCenterDeactivated() { 17 | // NOOP 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/supervisor/command/GetEntitiesBackendRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.owner.supervisor.command; 9 | 10 | import org.apache.pekko.actor.typed.ActorRef; 11 | import org.apache.pekko.pattern.StatusReply; 12 | 13 | public final class GetEntitiesBackendRequest extends OwnerSupervisorRequest { 14 | private static final long serialVersionUID = 1L; 15 | 16 | public GetEntitiesBackendRequest(final ActorRef> replyTo) { 17 | super(replyTo); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/supervisor/command/GetEntityOwnerBackendReply.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.owner.supervisor.command; 9 | 10 | import java.io.Serializable; 11 | import org.eclipse.jdt.annotation.Nullable; 12 | 13 | public final class GetEntityOwnerBackendReply extends OwnerSupervisorReply implements Serializable { 14 | private static final long serialVersionUID = 1L; 15 | 16 | private final String owner; 17 | 18 | public GetEntityOwnerBackendReply(final @Nullable String owner) { 19 | this.owner = owner; 20 | } 21 | 22 | public String getOwner() { 23 | return owner; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/supervisor/command/MemberDownEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.owner.supervisor.command; 9 | 10 | import java.util.Set; 11 | import org.apache.pekko.actor.Address; 12 | 13 | public final class MemberDownEvent extends InternalClusterEvent { 14 | public MemberDownEvent(final Address address, final Set roles) { 15 | super(address, roles); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/supervisor/command/MemberReachableEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.owner.supervisor.command; 9 | 10 | import java.util.Set; 11 | import org.apache.pekko.actor.Address; 12 | 13 | public final class MemberReachableEvent extends InternalClusterEvent { 14 | public MemberReachableEvent(final Address address, final Set roles) { 15 | super(address, roles); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/supervisor/command/MemberUnreachableEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.owner.supervisor.command; 9 | 10 | import java.util.Set; 11 | import org.apache.pekko.actor.Address; 12 | 13 | public final class MemberUnreachableEvent extends InternalClusterEvent { 14 | public MemberUnreachableEvent(final Address address, final Set roles) { 15 | super(address, roles); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/supervisor/command/MemberUpEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.owner.supervisor.command; 9 | 10 | import java.util.Set; 11 | import org.apache.pekko.actor.Address; 12 | 13 | public final class MemberUpEvent extends InternalClusterEvent { 14 | public MemberUpEvent(final Address address, final Set roles) { 15 | super(address, roles); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/supervisor/command/OwnerSupervisorCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.owner.supervisor.command; 9 | 10 | public abstract class OwnerSupervisorCommand { 11 | OwnerSupervisorCommand() { 12 | // Hidden on purpose 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/owner/supervisor/command/OwnerSupervisorReply.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.owner.supervisor.command; 9 | 10 | public abstract class OwnerSupervisorReply { 11 | OwnerSupervisorReply() { 12 | // Hidden on purpose 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/registry/candidate/command/CandidateRegistryCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.registry.candidate.command; 9 | 10 | public abstract class CandidateRegistryCommand { 11 | CandidateRegistryCommand() { 12 | // Hidden on purpose 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/registry/candidate/command/CandidateRemovalFailed.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.registry.candidate.command; 9 | 10 | public class CandidateRemovalFailed extends CandidateRegistryCommand { 11 | 12 | private final Throwable throwable; 13 | 14 | public CandidateRemovalFailed(final Throwable throwable) { 15 | this.throwable = throwable; 16 | } 17 | 18 | public Throwable getThrowable() { 19 | return throwable; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/registry/candidate/command/CandidateRemovalFinished.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.registry.candidate.command; 9 | 10 | public class CandidateRemovalFinished extends CandidateRegistryCommand { 11 | } 12 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/registry/candidate/command/RegisterCandidate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.registry.candidate.command; 9 | 10 | import org.opendaylight.mdsal.eos.dom.api.DOMEntity; 11 | 12 | /** 13 | * Sent to Candidate registry to register the candidate for a given entity. 14 | */ 15 | public final class RegisterCandidate extends AbstractCandidateCommand { 16 | public RegisterCandidate(final DOMEntity entity, final String candidate) { 17 | super(entity, candidate); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/registry/candidate/command/RemovePreviousCandidates.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.registry.candidate.command; 9 | 10 | /** 11 | * Message sent to candidate registry initial behavior by self to trigger and retrigger(in case of failures) removal 12 | * of candidates registered by the previous iteration of this node. 13 | */ 14 | public class RemovePreviousCandidates extends CandidateRegistryCommand { 15 | } 16 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/registry/candidate/command/UnregisterCandidate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.registry.candidate.command; 9 | 10 | import org.opendaylight.mdsal.eos.dom.api.DOMEntity; 11 | 12 | /** 13 | * Sent to CandidateRegistry to unregister the candidate for a given entity. 14 | */ 15 | public final class UnregisterCandidate extends AbstractCandidateCommand { 16 | public UnregisterCandidate(final DOMEntity entity, final String candidate) { 17 | super(entity, candidate); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/registry/listener/owner/command/ListenerCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.registry.listener.owner.command; 9 | 10 | public abstract class ListenerCommand { 11 | ListenerCommand() { 12 | // Hidden on purpose 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/registry/listener/type/command/RegisterListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.registry.listener.type.command; 9 | 10 | import org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipListener; 11 | 12 | /** 13 | * Register a DOMEntityOwnershipListener for a given entity-type. 14 | */ 15 | public final class RegisterListener extends TypeListenerRegistryCommand { 16 | public RegisterListener(final String entityType, final DOMEntityOwnershipListener delegateListener) { 17 | super(entityType, delegateListener); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/registry/listener/type/command/TerminateListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.registry.listener.type.command; 9 | 10 | /** 11 | * Sent to the listener actor to stop it on demand ie during listener unregistration. 12 | */ 13 | public final class TerminateListener extends TypeListenerCommand { 14 | 15 | public static final TerminateListener INSTANCE = new TerminateListener(); 16 | 17 | private TerminateListener() { 18 | // Hidden on purpose 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/registry/listener/type/command/TypeListenerCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.registry.listener.type.command; 9 | 10 | public abstract class TypeListenerCommand { 11 | TypeListenerCommand() { 12 | // Hidden on purpose 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/registry/listener/type/command/UnregisterListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.eos.akka.registry.listener.type.command; 9 | 10 | import org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipListener; 11 | 12 | /** 13 | * Unregister a listener from the EntityTypeListenerRegistry. 14 | */ 15 | public final class UnregisterListener extends TypeListenerRegistryCommand { 16 | public UnregisterListener(final String entityType, final DOMEntityOwnershipListener delegateListener) { 17 | super(entityType, delegateListener); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/controller/entity/owners/norev/EntityNameBuilder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.entity.owners.norev; 9 | 10 | public final class EntityNameBuilder { 11 | private EntityNameBuilder() { 12 | // Hidden on purpose 13 | } 14 | 15 | public static EntityName getDefaultInstance(final String defaultValue) { 16 | throw new UnsupportedOperationException("Not yet implemented"); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /opendaylight/md-sal/eos-dom-akka/src/test/resources/simplelogger.properties: -------------------------------------------------------------------------------- 1 | org.slf4j.simpleLogger.defaultLogLevel=info 2 | org.slf4j.simpleLogger.showDateTime=true 3 | org.slf4j.simpleLogger.dateTimeFormat=hh:mm:ss,S a 4 | org.slf4j.simpleLogger.logFile=System.out 5 | org.slf4j.simpleLogger.showShortLogName=true 6 | org.slf4j.simpleLogger.levelInBrackets=true 7 | org.slf4j.simpleLogger.log.org.opendaylight.controller.eos.akka=debug 8 | org.slf4j.simpleLogger.log.org.opendaylight.mdsal.singleton=debug -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/ExampleConfigParamsImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.example; 9 | 10 | import org.opendaylight.controller.cluster.raft.DefaultConfigParamsImpl; 11 | 12 | /** 13 | * Implementation of ConfigParams for Example. 14 | */ 15 | public class ExampleConfigParamsImpl extends DefaultConfigParamsImpl { 16 | @Override 17 | public long getSnapshotBatchCount() { 18 | return 25; 19 | } 20 | 21 | @Override 22 | public int getMaximumMessageSliceSize() { 23 | return 50; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/messages/KVv1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.example.messages; 9 | 10 | import java.io.Serializable; 11 | 12 | final class KVv1 implements Serializable { 13 | private static final long serialVersionUID = 1L; 14 | 15 | private final String key; 16 | private final String value; 17 | 18 | KVv1(String key, String value) { 19 | this.key = key; 20 | this.value = value; 21 | } 22 | 23 | Object readResolve() { 24 | return new KeyValue(key, value); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/messages/KeyValueSaved.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.example.messages; 10 | 11 | import java.io.Serializable; 12 | 13 | public class KeyValueSaved implements Serializable { 14 | private static final long serialVersionUID = 1L; 15 | } 16 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/messages/PrintRole.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.example.messages; 10 | 11 | import java.io.Serializable; 12 | 13 | public class PrintRole implements Serializable { 14 | private static final long serialVersionUID = 1L; 15 | } 16 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/messages/PrintState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.example.messages; 10 | 11 | import java.io.Serializable; 12 | 13 | public class PrintState implements Serializable { 14 | private static final long serialVersionUID = 1L; 15 | } 16 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/messages/RegisterListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.example.messages; 10 | 11 | /** 12 | * Message sent by the Example Role Change Listener to itself for registering itself with the notifiers. 13 | * This message is sent by the scheduler. 14 | */ 15 | public class RegisterListener { 16 | } 17 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/messages/SetNotifiers.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.example.messages; 10 | 11 | import java.util.List; 12 | 13 | /** 14 | * Created by kramesha on 11/18/14. 15 | */ 16 | public class SetNotifiers { 17 | private List notifierList; 18 | 19 | public SetNotifiers(List notifierList) { 20 | this.notifierList = notifierList; 21 | } 22 | 23 | public List getNotifierList() { 24 | return notifierList; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-akka-raft-example/src/main/resources/simplelogger.properties: -------------------------------------------------------------------------------- 1 | org.slf4j.simpleLogger.defaultLogLevel=debug -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-akka-segmented-journal/src/test/resources/SegmentedFileJournalTest.conf: -------------------------------------------------------------------------------- 1 | pekko { 2 | persistence { 3 | journal { 4 | plugin = "pekko.persistence.journal.segmented-file" 5 | 6 | segmented-file { 7 | class = "org.opendaylight.controller.akka.segjournal.SegmentedFileJournal" 8 | root-directory = "target/segmented-journal" 9 | max-entry-size = 8M 10 | max-segment-size = 32M 11 | memory-mapped = false 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-cluster-admin-impl/.gitignore: -------------------------------------------------------------------------------- 1 | state 2 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-cluster-admin-impl/src/test/resources/simplelogger.properties: -------------------------------------------------------------------------------- 1 | org.slf4j.simpleLogger.showDateTime=true 2 | org.slf4j.simpleLogger.dateTimeFormat=hh:mm:ss,S a 3 | org.slf4j.simpleLogger.logFile=System.out 4 | org.slf4j.simpleLogger.showShortLogName=true 5 | org.slf4j.simpleLogger.levelInBrackets=true 6 | org.slf4j.simpleLogger.log.org.opendaylight.controller.cluster.datastore=debug 7 | org.slf4j.simpleLogger.log.org.opendaylight.controller.cluster.datastore.Shard=debug 8 | org.slf4j.simpleLogger.log.org.opendaylight.controller.cluster.datastore.utils.ActorContext=error 9 | org.slf4j.simpleLogger.log.org.opendaylight.controller.cluster.raft.RaftActorServerConfigurationSupport=debug 10 | org.slf4j.simpleLogger.log.org.opendaylight.controller.cluster.raft.RaftActorLeadershipTransferCohort=debug 11 | org.slf4j.simpleLogger.log.org.opendaylight.controller.cluster.datastore.node.utils.stream=off 12 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/AbstractUntypedPersistentActorWithMetering.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.common.actor; 9 | 10 | /** 11 | * Actor with its behaviour metered. Metering is enabled by configuration. 12 | */ 13 | public abstract class AbstractUntypedPersistentActorWithMetering extends AbstractUntypedPersistentActor { 14 | protected AbstractUntypedPersistentActorWithMetering(final String persistanceId) { 15 | super(persistanceId); 16 | if (new CommonConfig(getContext().system().settings().config()).isMetricCaptureEnabled()) { 17 | getContext().become(new MeteringBehavior(this)); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/AkkaConfigurationReader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.common.actor; 10 | 11 | import com.typesafe.config.Config; 12 | 13 | public interface AkkaConfigurationReader { 14 | Config read(); 15 | } 16 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/ExecuteInSelfActor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Pantheon Technologies, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.common.actor; 9 | 10 | import com.google.common.annotations.Beta; 11 | import org.eclipse.jdt.annotation.NonNullByDefault; 12 | 13 | /** 14 | * Interface implemented by Actors, who can schedule invocation of a {@link Runnable} in their context. 15 | */ 16 | @Beta 17 | @NonNullByDefault 18 | @FunctionalInterface 19 | public interface ExecuteInSelfActor { 20 | /** 21 | * Run a Runnable in the context of this actor. 22 | * 23 | * @param runnable Runnable to run 24 | */ 25 | void executeInSelf(Runnable runnable); 26 | } 27 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/ExecuteInSelfMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Pantheon Technologies, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.common.actor; 9 | 10 | import static java.util.Objects.requireNonNull; 11 | 12 | import org.apache.pekko.dispatch.ControlMessage; 13 | import org.eclipse.jdt.annotation.NonNullByDefault; 14 | 15 | /** 16 | * Message internal to {@link ExecuteInSelfActor} implementations in this package. 17 | */ 18 | @NonNullByDefault 19 | record ExecuteInSelfMessage(Runnable runnable) implements ControlMessage { 20 | ExecuteInSelfMessage { 21 | requireNonNull(runnable); 22 | } 23 | 24 | void run() { 25 | runnable.run(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/Monitor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.common.actor; 10 | 11 | import java.io.Serializable; 12 | import org.apache.pekko.actor.ActorRef; 13 | 14 | public class Monitor implements Serializable { 15 | private static final long serialVersionUID = 1L; 16 | private final ActorRef actorRef; 17 | 18 | public Monitor(ActorRef actorRef) { 19 | this.actorRef = actorRef; 20 | } 21 | 22 | public ActorRef getActorRef() { 23 | return actorRef; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/UnifiedConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.common.actor; 9 | 10 | import com.typesafe.config.Config; 11 | 12 | /** 13 | * Represents a unified view of configuration. It merges configuration from: 14 | *
    15 | *
  • Config subsystem
  • 16 | *
  • Akka configuration files
  • 17 | *
18 | * Configurations defined in config subsystem takes precedence. 19 | */ 20 | public interface UnifiedConfig { 21 | /** 22 | * Returns an immutable instance of unified configuration. 23 | * 24 | * @return a Config instance 25 | */ 26 | Config get(); 27 | } 28 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/NormalizedNodeVisitor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.node.utils; 9 | 10 | import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; 11 | 12 | public interface NormalizedNodeVisitor { 13 | void visitNode(int level, String parentPath, NormalizedNode normalizedNode); 14 | } 15 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/messaging/AssemblerSealedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Inocybe Technologies and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.messaging; 9 | 10 | /** 11 | * A MessageSliceException indicating the message assembler has already been sealed. 12 | * 13 | * @author Thomas Pantelis 14 | */ 15 | public class AssemblerSealedException extends MessageSliceException { 16 | private static final long serialVersionUID = 1L; 17 | 18 | /** 19 | * Constructs an instance. 20 | * 21 | * @param message he detail message 22 | */ 23 | public AssemblerSealedException(String message) { 24 | super(message, false); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/messaging/StringIdentifier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Inocybe Technologies and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.messaging; 9 | 10 | import org.opendaylight.yangtools.util.AbstractStringIdentifier; 11 | 12 | /** 13 | * Identifier that stores a string. 14 | * 15 | * @author Thomas Pantelis 16 | */ 17 | public class StringIdentifier extends AbstractStringIdentifier { 18 | private static final long serialVersionUID = 1L; 19 | 20 | public StringIdentifier(String string) { 21 | super(string); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/test/resources/LocalSnapshotStoreTest.conf: -------------------------------------------------------------------------------- 1 | pekko { 2 | persistence { 3 | snapshot-store.local.class = "org.opendaylight.controller.cluster.persistence.LocalSnapshotStore" 4 | snapshot-store.plugin = pekko.persistence.snapshot-store.local 5 | snapshot-store.local.dir = "target/snapshots" 6 | snapshot-store.local.use-lz4-compression = false 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/test/resources/application.conf: -------------------------------------------------------------------------------- 1 | testsystem { 2 | 3 | bounded-mailbox { 4 | mailbox-type = "org.opendaylight.controller.cluster.common.actor.MeteredBoundedMailbox" 5 | mailbox-capacity = 10 6 | mailbox-push-timeout-time = 100ms 7 | } 8 | } -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/test/resources/augment_choice.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 2 14 | 2 15 | 16 | 17 | 3 18 | 19 | augment 20 | 21 | 1 22 | 1 23 | 1 24 | 25 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/test/resources/odl-ctlr1923.yang: -------------------------------------------------------------------------------- 1 | module odl-ctrl1923 { 2 | yang-version 1; 3 | namespace "urn:odl-ctlr1923"; 4 | prefix "ctrl1923"; 5 | 6 | description "Sodium -> Magnesium uint translation"; 7 | 8 | grouping grp { 9 | leaf a { type int8; } 10 | leaf b { type int16; } 11 | leaf c { type int32; } 12 | leaf d { type int64; } 13 | leaf e { type uint8; } 14 | leaf f { type uint16; } 15 | leaf g { type uint32; } 16 | leaf h { type uint64; } 17 | } 18 | 19 | container cont { 20 | uses grp; 21 | } 22 | 23 | list lst { 24 | key "a b c d e f g h"; 25 | uses grp; 26 | } 27 | 28 | leaf-list lf-lst8 { 29 | type uint8; 30 | } 31 | 32 | leaf-list lf-lst16 { 33 | type uint16; 34 | } 35 | 36 | leaf-list lf-lst32 { 37 | type uint32; 38 | } 39 | 40 | leaf-list lf-lst64 { 41 | type uint64; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/test/resources/odl-datastore-augmentation.yang: -------------------------------------------------------------------------------- 1 | module odl-datastore-augmentation { 2 | yang-version 1; 3 | namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:aug"; 4 | prefix "store-aug"; 5 | 6 | import odl-datastore-test {prefix test;revision-date "2014-03-13";} 7 | 8 | revision "2014-03-13" { 9 | description "Initial revision."; 10 | } 11 | 12 | 13 | augment "/test:test/test:augmented-list" { 14 | container cont { 15 | leaf name { 16 | type string; 17 | } 18 | } 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/test/resources/org/opendaylight/controller/xml/codec/rpcTest.yang: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | module rpc-test { 9 | yang-version 1; 10 | namespace "urn:opendaylight:controller:rpc:test"; 11 | prefix "rpct"; 12 | 13 | revision 2014-07-29 { 14 | description "rpc test"; 15 | } 16 | 17 | typedef flow-ref { 18 | type instance-identifier; 19 | } 20 | 21 | rpc add-flow { 22 | input { 23 | leaf id { 24 | type string; 25 | } 26 | 27 | leaf flow { 28 | type flow-ref; 29 | } 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/test/resources/reference.conf: -------------------------------------------------------------------------------- 1 | bounded-mailbox { 2 | mailbox-type = "org.opendaylight.controller.cluster.common.actor.MeteredBoundedMailbox" 3 | mailbox-capacity = 1000 4 | mailbox-push-timeout-time = 10ms 5 | } 6 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/test/resources/simple_xml_with_attributes.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 13 | 14 | 15 | 3 16 | 17 | 18 | false 19 | 20 | a 21 | 22 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/test/resources/simplelogger.properties: -------------------------------------------------------------------------------- 1 | org.slf4j.simpleLogger.showDateTime=true 2 | org.slf4j.simpleLogger.dateTimeFormat=hh:mm:ss,S a 3 | org.slf4j.simpleLogger.logFile=System.out 4 | org.slf4j.simpleLogger.showShortLogName=true 5 | org.slf4j.simpleLogger.levelInBrackets=true 6 | org.slf4j.simpleLogger.log.org.opendaylight.controller.cluster=debug 7 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/test/resources/version-compatibility-serialized-data/DataChangeListenerMessagesData: -------------------------------------------------------------------------------- 1 | 23 2 | 1 3 | test) 4 | '(urn:protobuff?revision=2014-07-31)test -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/test/resources/version-compatibility-serialized-data/ListenerRegistrationMessagesData: -------------------------------------------------------------------------------- 1 | 2 | m(urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:notification-test?revision=2014-04-15)family -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/test/resources/version-compatibility-serialized-data/NormalizedNodeMessagesTestData: -------------------------------------------------------------------------------- 1 | 2 | test testValuefake -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/test/resources/version-compatibility-serialized-data/PersistentMessagesTestData: -------------------------------------------------------------------------------- 1 | 2 | test3 3 | 1 4 | test) 5 | '(urn:protobuff?revision=2014-07-31)test -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/test/resources/version-compatibility-serialized-data/ShardManagerMessagesTestData: -------------------------------------------------------------------------------- 1 | 2 | Inventory -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/test/resources/version-compatibility-serialized-data/ShardTransactionChainMessagesTestData: -------------------------------------------------------------------------------- 1 | 2 | /actor/path -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/test/resources/version-compatibility-serialized-data/ShardTransactionMessagesTestData: -------------------------------------------------------------------------------- 1 | 2 | 3 3 | 1 4 | test) 5 | '(urn:protobuff?revision=2014-07-31)test -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-clustering-commons/src/test/resources/version-compatibility-serialized-data/ThreePhaseCommitCohortMessagesTestData: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/.gitignore: -------------------------------------------------------------------------------- 1 | state 2 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/FailedDataTreeModificationException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.databroker.actors.dds; 9 | 10 | import static java.util.Objects.requireNonNull; 11 | 12 | /** 13 | * A box {@link RuntimeException} thrown by {@link FailedDataTreeModification} from its user-facing methods. 14 | */ 15 | final class FailedDataTreeModificationException extends RuntimeException { 16 | private static final long serialVersionUID = 1L; 17 | 18 | FailedDataTreeModificationException(final Exception cause) { 19 | super(null, requireNonNull(cause), false, false); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | /** 9 | * This package contains implementation required by the DistributedDataStore frontend. 10 | * 11 | * @author Robert Varga 12 | */ 13 | package org.opendaylight.controller.cluster.databroker.actors.dds; -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ClusterWrapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.datastore; 10 | 11 | import org.apache.pekko.actor.ActorRef; 12 | import org.apache.pekko.actor.Address; 13 | import org.opendaylight.controller.cluster.access.concepts.MemberName; 14 | 15 | public interface ClusterWrapper { 16 | void subscribeToMemberEvents(ActorRef actorRef); 17 | 18 | MemberName getCurrentMemberName(); 19 | 20 | Address getSelfAddress(); 21 | } 22 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ReadOnlyShardDataTreeTransaction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore; 9 | 10 | import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier; 11 | import org.opendaylight.yangtools.yang.data.tree.api.DataTreeSnapshot; 12 | 13 | final class ReadOnlyShardDataTreeTransaction extends AbstractShardDataTreeTransaction { 14 | ReadOnlyShardDataTreeTransaction(final ShardDataTreeTransactionParent parent, final TransactionIdentifier id, 15 | final DataTreeSnapshot snapshot) { 16 | super(parent, id, snapshot); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeNotificationPublisher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore; 9 | 10 | import java.util.concurrent.TimeUnit; 11 | import org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidate; 12 | 13 | /** 14 | * Interface for a class the publishes data tree notifications. 15 | * 16 | * @author Thomas Pantelis 17 | */ 18 | interface ShardDataTreeNotificationPublisher { 19 | long PUBLISH_DELAY_THRESHOLD_IN_MS = TimeUnit.MILLISECONDS.convert(1, TimeUnit.SECONDS); 20 | 21 | void publishChanges(DataTreeCandidate candidate); 22 | } 23 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore; 9 | 10 | public enum TransactionType { 11 | READ_ONLY, 12 | WRITE_ONLY, 13 | READ_WRITE; 14 | 15 | public static TransactionType fromInt(final int type) { 16 | return switch (type) { 17 | case 0 -> READ_ONLY; 18 | case 1 -> WRITE_ONLY; 19 | case 2 -> READ_WRITE; 20 | default -> throw new IllegalArgumentException("In TransactionType enum value " + type); 21 | }; 22 | } 23 | } -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/config/ModuleShardConfigProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.config; 9 | 10 | import java.util.Map; 11 | import org.eclipse.jdt.annotation.NonNull; 12 | 13 | /** 14 | * Interface for a class that provides module and shard configuration information. 15 | * 16 | * @author Thomas Pantelis 17 | */ 18 | public interface ModuleShardConfigProvider { 19 | /** 20 | * Returns a Map of ModuleConfig Builder instances keyed by module name. 21 | */ 22 | @NonNull Map retrieveModuleConfigs(@NonNull Configuration configuration); 23 | } 24 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/exceptions/AlreadyExistsException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.exceptions; 9 | 10 | public class AlreadyExistsException extends RuntimeException { 11 | private static final long serialVersionUID = 1L; 12 | 13 | public AlreadyExistsException(String message) { 14 | super(message); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/exceptions/LocalShardNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.exceptions; 9 | 10 | /** 11 | * Exception thrown when attempting to find a local shard but it doesn't exist. 12 | * 13 | * @author Thomas Pantelis 14 | */ 15 | public class LocalShardNotFoundException extends RuntimeException { 16 | private static final long serialVersionUID = 1L; 17 | 18 | public LocalShardNotFoundException(String message) { 19 | super(message); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/exceptions/NotInitializedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.exceptions; 9 | 10 | public class NotInitializedException extends RuntimeException { 11 | private static final long serialVersionUID = 1L; 12 | 13 | public NotInitializedException(String message) { 14 | super(message); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/exceptions/PrimaryNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.datastore.exceptions; 10 | 11 | public class PrimaryNotFoundException extends RuntimeException { 12 | private static final long serialVersionUID = 1L; 13 | 14 | public PrimaryNotFoundException(String message) { 15 | super(message); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/exceptions/ShardLeaderNotRespondingException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.exceptions; 9 | 10 | /** 11 | * Exception indicating a shard leader is not responding to messages. 12 | * 13 | * @author Thomas Pantelis 14 | */ 15 | public class ShardLeaderNotRespondingException extends RuntimeException { 16 | private static final long serialVersionUID = 1L; 17 | 18 | public ShardLeaderNotRespondingException(String message, Throwable cause) { 19 | super(message, cause); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/exceptions/TimeoutException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.datastore.exceptions; 10 | 11 | public class TimeoutException extends RuntimeException { 12 | private static final long serialVersionUID = 1L; 13 | 14 | public TimeoutException(String message, Exception cause) { 15 | super(message, cause); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/exceptions/UnknownMessageException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.datastore.exceptions; 10 | 11 | public class UnknownMessageException extends Exception { 12 | private static final long serialVersionUID = 1L; 13 | private final Object message; 14 | 15 | public UnknownMessageException(Object message) { 16 | this.message = message; 17 | } 18 | 19 | @Override public String getMessage() { 20 | return "Unknown message received " + " - " + message; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ActorInitialized.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.messages; 9 | 10 | import static java.util.Objects.requireNonNull; 11 | 12 | import org.apache.pekko.actor.ActorRef; 13 | import org.eclipse.jdt.annotation.NonNullByDefault; 14 | 15 | @NonNullByDefault 16 | public record ActorInitialized(ActorRef actorRef) { 17 | public ActorInitialized { 18 | requireNonNull(actorRef); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/EnableNotification.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.datastore.messages; 10 | 11 | public class EnableNotification { 12 | private final boolean enabled; 13 | private final String logContext; 14 | 15 | public EnableNotification(boolean enabled, String logContext) { 16 | this.enabled = enabled; 17 | this.logContext = logContext; 18 | } 19 | 20 | public boolean isEnabled() { 21 | return enabled; 22 | } 23 | 24 | public String getLogContext() { 25 | return logContext; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/GetInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Inocybe Technologies and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.messages; 9 | 10 | import org.opendaylight.controller.cluster.mgmt.api.DataTreeListenerInfo; 11 | 12 | /** 13 | * Local message sent to an actor to retrieve {@link DataTreeListenerInfo} for reporting. 14 | * 15 | * @author Thomas Pantelis 16 | */ 17 | public final class GetInfo { 18 | public static final GetInfo INSTANCE = new GetInfo(); 19 | 20 | private GetInfo() { 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/GetShardDataTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.messages; 9 | 10 | /** 11 | * Local message sent to a Shard to retrieve its data tree instance. 12 | * 13 | * @author Thomas Pantelis 14 | */ 15 | public final class GetShardDataTree { 16 | public static final GetShardDataTree INSTANCE = new GetShardDataTree(); 17 | 18 | private GetShardDataTree() { 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/GetShardRole.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.datastore.messages; 10 | 11 | /** 12 | * Message sent to the local ShardManager to request the current role for the given shard. 13 | */ 14 | public class GetShardRole { 15 | 16 | private final String name; 17 | 18 | public GetShardRole(final String name) { 19 | this.name = name; 20 | } 21 | 22 | public String getName() { 23 | return name; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/GetShardRoleReply.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.datastore.messages; 10 | 11 | /** 12 | * Reply to GetShardRole, containing the current role of the shard if present on the ShardManager. 13 | */ 14 | public class GetShardRoleReply { 15 | 16 | private final String role; 17 | 18 | public GetShardRoleReply(final String role) { 19 | this.role = role; 20 | } 21 | 22 | public String getRole() { 23 | return role; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/OnInitialData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Red Hat, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.messages; 9 | 10 | /** 11 | * Message sent to a data tree change listener actor to indicate there is no initial data. 12 | * 13 | * @author Thomas Pantelis 14 | */ 15 | public final class OnInitialData { 16 | public static final OnInitialData INSTANCE = new OnInitialData(); 17 | 18 | private OnInitialData() { 19 | // Hidden on purpose 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/PeerAddressResolved.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.datastore.messages; 10 | 11 | 12 | public class PeerAddressResolved { 13 | private final String peerId; 14 | private final String peerAddress; 15 | 16 | public PeerAddressResolved(String peerId, String peerAddress) { 17 | this.peerId = peerId; 18 | this.peerAddress = peerAddress; 19 | } 20 | 21 | public String getPeerId() { 22 | return peerId; 23 | } 24 | 25 | public String getPeerAddress() { 26 | return peerAddress; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/SerializableMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.datastore.messages; 10 | 11 | public interface SerializableMessage { 12 | Object toSerializable(); 13 | } 14 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/UpdateSchemaContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.messages; 9 | 10 | import static java.util.Objects.requireNonNull; 11 | 12 | import org.eclipse.jdt.annotation.NonNullByDefault; 13 | import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext; 14 | 15 | @NonNullByDefault 16 | public record UpdateSchemaContext(EffectiveModelContext modelContext) { 17 | public UpdateSchemaContext { 18 | requireNonNull(modelContext); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/DatastoreSnapshotList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.persisted; 9 | 10 | import java.util.ArrayList; 11 | import java.util.List; 12 | 13 | /** 14 | * Stores a list of DatastoreSnapshot instances. 15 | */ 16 | public class DatastoreSnapshotList extends ArrayList { 17 | private static final long serialVersionUID = 1L; 18 | 19 | public DatastoreSnapshotList() { 20 | } 21 | 22 | public DatastoreSnapshotList(List snapshots) { 23 | super(snapshots); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | /** 9 | * Persisted backend structures. This includes various Payloads and Snapshots. 10 | * 11 | * @author Robert Varga 12 | */ 13 | package org.opendaylight.controller.cluster.datastore.persisted; -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/GetLocalShardIds.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.shardmanager; 9 | 10 | final class GetLocalShardIds { 11 | static final GetLocalShardIds INSTANCE = new GetLocalShardIds(); 12 | 13 | private GetLocalShardIds() { 14 | // Prevent instantiation 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManagerCreator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.shardmanager; 9 | 10 | public final class ShardManagerCreator extends AbstractShardManagerCreator { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManagerIdentifier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.shardmanager; 9 | 10 | import static java.util.Objects.requireNonNull; 11 | 12 | import org.eclipse.jdt.annotation.NonNullByDefault; 13 | 14 | @NonNullByDefault 15 | public record ShardManagerIdentifier(String type) { 16 | public ShardManagerIdentifier { 17 | requireNonNull(type); 18 | } 19 | 20 | public String toActorName() { 21 | return "shardmanager-" + type; 22 | } 23 | 24 | @Override 25 | public String toString() { 26 | return toActorName(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/LocalShardStore.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore; 9 | 10 | import org.opendaylight.controller.cluster.datastore.shardmanager.TestShardManager.GetLocalShardsReply; 11 | 12 | public interface LocalShardStore { 13 | 14 | GetLocalShardsReply getLocalShards(); 15 | } 16 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/config/ConfigurationImplFileTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.config; 9 | 10 | public class ConfigurationImplFileTest extends ConfigurationImplBaseTest { 11 | 12 | @Override 13 | public ConfigurationImpl createConfiguration() { 14 | return new ConfigurationImpl("module-shards.conf", "modules.conf"); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/config/EmptyModuleShardConfigProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.config; 9 | 10 | import java.util.Collections; 11 | import java.util.Map; 12 | 13 | /** 14 | * ModuleShardConfigProvider implementation that returns an empty map. 15 | * 16 | * @author Thomas Pantelis 17 | */ 18 | public class EmptyModuleShardConfigProvider implements ModuleShardConfigProvider { 19 | 20 | @Override 21 | public Map retrieveModuleConfigs(Configuration configuration) { 22 | return Collections.emptyMap(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/AbortTransactionPayloadTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.persisted; 9 | 10 | public class AbortTransactionPayloadTest extends AbstractIdentifiablePayloadTest { 11 | public AbortTransactionPayloadTest() { 12 | super(AbortTransactionPayload.create(newTransactionId(0), 512), 125); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/CloseLocalHistoryPayloadTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Pantheon Technologies s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.persisted; 9 | 10 | public class CloseLocalHistoryPayloadTest extends AbstractIdentifiablePayloadTest { 11 | public CloseLocalHistoryPayloadTest() { 12 | super(CloseLocalHistoryPayload.create(newHistoryId(0), 512), 124); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/CreateLocalHistoryPayloadTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Pantheon Technologies s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.persisted; 9 | 10 | public class CreateLocalHistoryPayloadTest extends AbstractIdentifiablePayloadTest { 11 | public CreateLocalHistoryPayloadTest() { 12 | super(CreateLocalHistoryPayload.create(newHistoryId(0), 512), 124); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/PurgeLocalHistoryPayloadTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Pantheon Technologies s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.persisted; 9 | 10 | public class PurgeLocalHistoryPayloadTest extends AbstractIdentifiablePayloadTest { 11 | public PurgeLocalHistoryPayloadTest() { 12 | super(PurgeLocalHistoryPayload.create(newHistoryId(0), 512), 124); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/PurgeTransactionPayloadTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Pantheon Technologies s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.persisted; 9 | 10 | public class PurgeTransactionPayloadTest extends AbstractIdentifiablePayloadTest { 11 | public PurgeTransactionPayloadTest() { 12 | super(PurgeTransactionPayload.create(newTransactionId(0), 512), 125); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/SkipTransactionsPayloadTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.persisted; 9 | 10 | import org.opendaylight.controller.cluster.raft.spi.MutableUnsignedLongSet; 11 | 12 | public class SkipTransactionsPayloadTest extends AbstractIdentifiablePayloadTest { 13 | public SkipTransactionsPayloadTest() { 14 | super(SkipTransactionsPayload.create(newHistoryId(0), MutableUnsignedLongSet.of(42).immutableCopy(), 512), 131); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/shardstrategy/DefaultShardStrategyTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.datastore.shardstrategy; 10 | 11 | import org.junit.Assert; 12 | import org.junit.Test; 13 | import org.opendaylight.controller.md.cluster.datastore.model.TestModel; 14 | 15 | public class DefaultShardStrategyTest { 16 | @Test 17 | public void testFindShard() { 18 | String shard = DefaultShardStrategy.getInstance().findShard(TestModel.TEST_PATH); 19 | Assert.assertEquals(DefaultShardStrategy.DEFAULT_SHARD, shard); 20 | } 21 | } -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/ForwardingActor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.datastore.utils; 9 | 10 | import org.apache.pekko.actor.ActorRef; 11 | import org.apache.pekko.actor.UntypedAbstractActor; 12 | 13 | public final class ForwardingActor extends UntypedAbstractActor { 14 | private final ActorRef target; 15 | 16 | private ForwardingActor(final ActorRef target) { 17 | this.target = target; 18 | } 19 | 20 | @Override 21 | public void onReceive(final Object obj) { 22 | target.forward(obj, context()); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/resources/cars.yang: -------------------------------------------------------------------------------- 1 | module cars { 2 | yang-version 1; 3 | namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:test:cars"; 4 | prefix "cars"; 5 | 6 | revision "2014-03-13" { 7 | description "Initial revision."; 8 | } 9 | 10 | container cars { 11 | presence "expected to exist when empty"; 12 | list car { 13 | key name; 14 | leaf name { 15 | type string; 16 | } 17 | 18 | leaf price { 19 | type uint64; 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/resources/empty-modules.conf: -------------------------------------------------------------------------------- 1 | modules = [] -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/resources/expectedSnapshotExport.json: -------------------------------------------------------------------------------- 1 | {"odl-datastore-test:test":{}} -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/resources/module-shards-cars-member-1-and-2-and-3.conf: -------------------------------------------------------------------------------- 1 | module-shards = [ 2 | { 3 | name = "cars" 4 | shards = [ 5 | { 6 | name="cars" 7 | replicas = [ 8 | "member-1", 9 | "member-2", 10 | "member-3" 11 | ] 12 | } 13 | ] 14 | } 15 | ] 16 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/resources/module-shards-cars-member-1-and-2.conf: -------------------------------------------------------------------------------- 1 | module-shards = [ 2 | { 3 | name = "cars" 4 | shards = [ 5 | { 6 | name="cars" 7 | replicas = [ 8 | "member-1", 9 | "member-2" 10 | ] 11 | } 12 | ] 13 | } 14 | ] -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/resources/module-shards-cars-member-1.conf: -------------------------------------------------------------------------------- 1 | module-shards = [ 2 | { 3 | name = "cars" 4 | shards = [ 5 | { 6 | name="cars" 7 | replicas = [ 8 | "member-1" 9 | ] 10 | } 11 | ] 12 | } 13 | ] -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/resources/module-shards-default-5-node.conf: -------------------------------------------------------------------------------- 1 | module-shards = [ 2 | { 3 | name = "default" 4 | shards = [ 5 | { 6 | name="default", 7 | replicas = [ 8 | "member-1", 9 | "member-2", 10 | "member-3", 11 | "member-4", 12 | "member-5" 13 | ] 14 | } 15 | ] 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/resources/module-shards-default-cars-member1-and-2.conf: -------------------------------------------------------------------------------- 1 | module-shards = [ 2 | { 3 | name = "default" 4 | shards = [ 5 | { 6 | name="default", 7 | replicas = [ 8 | "member-1", 9 | "member-2" 10 | ] 11 | } 12 | ] 13 | }, 14 | { 15 | name = "cars" 16 | shards = [ 17 | { 18 | name="cars" 19 | replicas = [ 20 | "member-1", 21 | "member-2" 22 | ] 23 | } 24 | ] 25 | } 26 | ] -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/resources/module-shards-default-cars-member1.conf: -------------------------------------------------------------------------------- 1 | module-shards = [ 2 | { 3 | name = "default" 4 | shards = [ 5 | { 6 | name="default", 7 | replicas = [ 8 | "member-1", 9 | ] 10 | } 11 | ] 12 | }, 13 | { 14 | name = "cars" 15 | shards = [ 16 | { 17 | name="cars" 18 | replicas = [ 19 | "member-1" 20 | ] 21 | } 22 | ] 23 | } 24 | ] -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/resources/module-shards-default-member-1.conf: -------------------------------------------------------------------------------- 1 | module-shards = [ 2 | { 3 | name = "default" 4 | shards = [ 5 | { 6 | name="default", 7 | replicas = [ 8 | "member-1" 9 | ] 10 | } 11 | ] 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/resources/module-shards-default.conf: -------------------------------------------------------------------------------- 1 | module-shards = [ 2 | { 3 | name = "default" 4 | shards = [ 5 | { 6 | name="default", 7 | replicas = [ 8 | "member-1", 9 | "member-2", 10 | "member-3" 11 | ] 12 | } 13 | ] 14 | } 15 | ] 16 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/resources/module-shards-member1-and-2-and-3.conf: -------------------------------------------------------------------------------- 1 | module-shards = [ 2 | { 3 | name = "people" 4 | shards = [ 5 | { 6 | name="people" 7 | replicas = [ 8 | "member-1", 9 | "member-2", 10 | "member-3" 11 | ] 12 | } 13 | ] 14 | }, 15 | { 16 | name = "cars" 17 | shards = [ 18 | { 19 | name="cars" 20 | replicas = [ 21 | "member-1", 22 | "member-2", 23 | "member-3" 24 | ] 25 | } 26 | ] 27 | } 28 | ] 29 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/resources/module-shards-member1-and-2.conf: -------------------------------------------------------------------------------- 1 | module-shards = [ 2 | { 3 | name = "people" 4 | shards = [ 5 | { 6 | name="people" 7 | replicas = [ 8 | "member-1", 9 | "member-2" 10 | ] 11 | } 12 | ] 13 | }, 14 | { 15 | name = "cars" 16 | shards = [ 17 | { 18 | name="cars" 19 | replicas = [ 20 | "member-1", 21 | "member-2" 22 | ] 23 | } 24 | ] 25 | } 26 | ] 27 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/resources/module-shards-member1.conf: -------------------------------------------------------------------------------- 1 | module-shards = [ 2 | { 3 | name = "people" 4 | shards = [ 5 | { 6 | name="people" 7 | replicas = [ 8 | "member-1" 9 | ] 10 | } 11 | ] 12 | }, 13 | { 14 | name = "cars" 15 | shards = [ 16 | { 17 | name="cars" 18 | replicas = [ 19 | "member-1" 20 | ] 21 | } 22 | ] 23 | } 24 | ] -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/resources/module-shards-member2.conf: -------------------------------------------------------------------------------- 1 | module-shards = [ 2 | { 3 | name = "people" 4 | shards = [ 5 | { 6 | name="people" 7 | replicas = [ 8 | "member-2" 9 | ] 10 | } 11 | ] 12 | }, 13 | { 14 | name = "cars" 15 | shards = [ 16 | { 17 | name="cars" 18 | replicas = [ 19 | "member-2" 20 | ] 21 | } 22 | ] 23 | } 24 | ] -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/resources/modules.conf: -------------------------------------------------------------------------------- 1 | modules = [ 2 | { 3 | name = "people" 4 | namespace = "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:test:people" 5 | shard-strategy = "module" 6 | }, 7 | { 8 | name = "cars" 9 | namespace = "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:test:cars" 10 | shard-strategy = "module" 11 | }, 12 | { 13 | name = "test" 14 | namespace = "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:test" 15 | shard-strategy = "module" 16 | } 17 | 18 | { 19 | name = "missing" 20 | namespace = "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:missing" 21 | shard-strategy = "module" 22 | } 23 | 24 | ] 25 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/resources/odl-datastore-augmentation.yang: -------------------------------------------------------------------------------- 1 | module odl-datastore-augmentation { 2 | yang-version 1; 3 | namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:aug"; 4 | prefix "store-aug"; 5 | 6 | import odl-datastore-test {prefix test;revision-date "2014-03-13";} 7 | 8 | revision "2014-03-13" { 9 | description "Initial revision."; 10 | } 11 | 12 | 13 | augment "/test:test" { 14 | leaf name { 15 | type string; 16 | } 17 | } 18 | 19 | augment "/test:test" { 20 | container aug-container { 21 | container aug-inner-container { 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-distributed-datastore/src/test/resources/people.yang: -------------------------------------------------------------------------------- 1 | module people { 2 | yang-version 1; 3 | namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:test:people"; 4 | prefix "people"; 5 | 6 | revision "2014-03-13" { 7 | description "Initial revision."; 8 | } 9 | 10 | container people { 11 | presence "expected to exist when empty"; 12 | list person { 13 | key name; 14 | leaf name { 15 | type string; 16 | } 17 | 18 | leaf age { 19 | type uint32; 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-dummy-distributed-datastore/README: -------------------------------------------------------------------------------- 1 | To use this run a real instance of the controller on your laptop. 2 | Modify the module-shards.conf to replicate modules to member-2 or 3 | member-2 and member-3 as neccessary. 4 | 5 | Then run the dummy datastore. 6 | 7 | For example, 8 | 9 | java -jar ./target/sal-dummy-distributed-datastore-1.2.0-SNAPSHOT-allinone.jar -member-name member-2 -cause-trouble -drop-replies -max-delay-millis 500 10 | 11 | Runs the dummy datastore as member-2. Will cause failures including dropped replies and when it does reply may cause a random delay of upto 12 | 500 millis 13 | 14 | This will start of the dummy datastore which will then spawn dummy shard actors which will listen to the RequestVote 15 | and AppendEntries messages. For RequestVote messages it will always respond with a positive vote and for AppendEntries 16 | it will put a sleep for a randomized interval upto the max delay. -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-dummy-distributed-datastore/src/main/resources/simplelogger.properties: -------------------------------------------------------------------------------- 1 | org.slf4j.simpleLogger.showDateTime=true 2 | org.slf4j.simpleLogger.dateTimeFormat=hh:mm:ss,S a 3 | org.slf4j.simpleLogger.logFile=System.out 4 | org.slf4j.simpleLogger.showShortLogName=true 5 | org.slf4j.simpleLogger.levelInBrackets=true 6 | org.slf4j.simpleLogger.defaultLogLevel=error -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RemoteDOMActionException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Nordix Foundation. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.remote.rpc; 9 | 10 | import org.opendaylight.mdsal.dom.api.DOMActionException; 11 | 12 | public class RemoteDOMActionException extends DOMActionException { 13 | private static final long serialVersionUID = 1L; 14 | 15 | RemoteDOMActionException(final String message, final Throwable cause) { 16 | super(message, cause); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RemoteDOMRpcException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.remote.rpc; 9 | 10 | import org.opendaylight.mdsal.dom.api.DOMRpcException; 11 | 12 | class RemoteDOMRpcException extends DOMRpcException { 13 | 14 | private static final long serialVersionUID = 1L; 15 | 16 | RemoteDOMRpcException(final String message, final Throwable cause) { 17 | super(message,cause); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/gossip/Bucket.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.remote.rpc.registry.gossip; 9 | 10 | import java.util.Optional; 11 | import org.apache.pekko.actor.ActorRef; 12 | import org.eclipse.jdt.annotation.NonNull; 13 | 14 | public interface Bucket> { 15 | long getVersion(); 16 | 17 | @NonNull T getData(); 18 | 19 | default Optional getWatchActor() { 20 | return getData().getWatchActor(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteActionRegistryMXBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Nordix Foundation. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.remote.rpc.registry.mbeans; 9 | 10 | import java.util.Map; 11 | import java.util.Set; 12 | 13 | public interface RemoteActionRegistryMXBean { 14 | 15 | String getBucketVersions(); 16 | 17 | Set getLocalRegisteredAction(); 18 | 19 | Map findActionByName(String name); 20 | 21 | Map findActionByRoute(String route); 22 | } 23 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/registry/mbeans/RemoteRpcRegistryMXBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015, 2017 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.remote.rpc.registry.mbeans; 9 | 10 | import java.util.Map; 11 | import java.util.Set; 12 | 13 | /** 14 | * JMX bean to check remote rpc registry. 15 | */ 16 | public interface RemoteRpcRegistryMXBean { 17 | 18 | Set getGlobalRpc(); 19 | 20 | String getBucketVersions(); 21 | 22 | Set getLocalRegisteredRoutedRpc(); 23 | 24 | Map findRpcByName(String name); 25 | 26 | Map findRpcByRoute(String route); 27 | } 28 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-remoterpc-connector/src/test/resources/simplelogger.properties: -------------------------------------------------------------------------------- 1 | org.slf4j.simpleLogger.showDateTime=true 2 | org.slf4j.simpleLogger.dateTimeFormat=hh:mm:ss,S a 3 | org.slf4j.simpleLogger.logFile=System.out 4 | org.slf4j.simpleLogger.showShortLogName=true 5 | org.slf4j.simpleLogger.levelInBrackets=true 6 | org.slf4j.simpleLogger.log.org.opendaylight.controller.remote.rpc=debug 7 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-remoterpc-connector/src/test/resources/test-rpc.yang: -------------------------------------------------------------------------------- 1 | module test-rpc-service { 2 | yang-version 1; 3 | namespace "urn:test"; 4 | prefix "rpc"; 5 | 6 | revision "2014-08-28" { 7 | description 8 | "Initial revision"; 9 | } 10 | 11 | rpc test-rpc { 12 | input { 13 | leaf input-data { 14 | type string; 15 | } 16 | } 17 | 18 | output { 19 | leaf output-data { 20 | type string; 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-test-model/src/main/yang/opendaylight-listener-test.yang: -------------------------------------------------------------------------------- 1 | module listener-container { 2 | yang-version 1; 3 | namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:test:listener"; 4 | prefix "test"; 5 | 6 | revision "2015-08-25" { 7 | description 8 | "Initial revision."; 9 | } 10 | 11 | container listener-test { 12 | list list-item { 13 | key "sip op"; 14 | leaf sip { 15 | type string; 16 | } 17 | leaf op { 18 | type uint32; 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-test-model/src/main/yang/opendaylight-test-bug-2562.yang: -------------------------------------------------------------------------------- 1 | module opendaylight-test-bug-2562 { 2 | yang-version 1; 3 | namespace "opendaylight-test-bug-2562:namespace"; 4 | prefix "ty"; 5 | revision "2016-01-01" { 6 | description 7 | "bug 2562 Binding Data Codec: Incorrectly deserialized unkeyed list from NormalizedNode"; 8 | } 9 | 10 | container root { 11 | list fooroot { 12 | list barroot { 13 | key "type"; 14 | leaf type { type int32; } 15 | leaf value { type int32; } 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-test-model/src/main/yang/opendaylight-test-bug-3090.yang: -------------------------------------------------------------------------------- 1 | module opendaylight-test-bug-3090 { 2 | yang-version 1; 3 | namespace "urn:opendaylight:params:xml:ns:opendaylight-test-bug-3090"; 4 | prefix "rpc"; 5 | 6 | description 7 | "Test model for Bug 3090 - An AsyncDataChangeEvent instance's getCreatedData() method can't get data if list has multi-key"; 8 | 9 | revision "2016-01-01" { 10 | description 11 | "Bug 3090"; 12 | } 13 | 14 | container root { 15 | list list-in-root { 16 | key "leaf-c leaf-a leaf-b"; 17 | leaf leaf-a { 18 | type string; 19 | } 20 | leaf leaf-b { 21 | type string; 22 | } 23 | leaf leaf-c { 24 | type string; 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-test-model/src/main/yang/opendaylight-test-notification.yang: -------------------------------------------------------------------------------- 1 | module opendaylight-test-notification { 2 | yang-version 1; 3 | namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:test:bi:ba:notification"; 4 | prefix "ntf"; 5 | 6 | description 7 | "Test model for testing of registering notification listener and publishing of notification."; 8 | 9 | revision "2015-02-05" { 10 | description 11 | "Initial revision"; 12 | } 13 | 14 | notification out-of-pixie-dust-notification { 15 | description "Just a testing notification that we can not fly for now."; 16 | 17 | leaf reason { 18 | type string; 19 | } 20 | 21 | leaf days-till-new-dust { 22 | type uint16; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /opendaylight/md-sal/sal-test-model/src/main/yang/opendaylight-test-rpc-service.yang: -------------------------------------------------------------------------------- 1 | module opendaylight-test-rpc-service { 2 | yang-version 1; 3 | namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:test:bi:ba:rpcservice"; 4 | prefix "rpc"; 5 | 6 | description 7 | "Test model for testing of registering rpc service on binding independent mount point 8 | and retrieving rpc service via binding aware mount point."; 9 | 10 | revision "2014-07-01" { 11 | description 12 | "Initial revision"; 13 | } 14 | 15 | rpc rock-the-house { 16 | input { 17 | leaf zip-code { 18 | type string; 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /opendaylight/md-sal/samples/clustering-test-app/model/src/main/yang/car-people.yang: -------------------------------------------------------------------------------- 1 | module car-people { 2 | yang-version 1; 3 | 4 | namespace "urn:opendaylight:params:xml:ns:yang:controller:config:sal-clustering-it:car-people"; 5 | 6 | prefix car; 7 | 8 | import car { prefix "c"; revision-date 2014-08-18; } 9 | import people { prefix "people"; revision-date 2014-08-18; } 10 | 11 | organization "Netconf Central"; 12 | 13 | contact 14 | "Harman Singh "; 15 | 16 | description 17 | "YANG model for car for test application"; 18 | 19 | revision "2014-08-18" { 20 | description 21 | "Clustering sample app"; 22 | } 23 | 24 | container car-people { 25 | description 26 | "Top-level container for all people car map"; 27 | 28 | list car-person { 29 | key "car-id person-id"; 30 | description "A mapping of cars and people."; 31 | leaf car-id { 32 | type c:car-id; 33 | } 34 | 35 | leaf person-id { 36 | type people:person-id; 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /opendaylight/md-sal/samples/clustering-test-app/model/src/main/yang/rpc-test.yang: -------------------------------------------------------------------------------- 1 | module basic-rpc-test { 2 | yang-version 1; 3 | 4 | namespace "urn:opendaylight:controller:basic-rpc-test"; 5 | prefix "base-endpoint"; 6 | 7 | revision "2016-01-20" { 8 | description 9 | "Initial revision."; 10 | } 11 | 12 | rpc basic-global { 13 | description "Invoke a global rpc that should only have one implementation registered on one of the nodes. 14 | It has no input/output."; 15 | } 16 | } -------------------------------------------------------------------------------- /opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/api/EggsType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, 2015 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.sample.kitchen.api; 10 | 11 | public enum EggsType { 12 | SCRAMBLED, 13 | OVER_EASY, 14 | POACHED 15 | } 16 | -------------------------------------------------------------------------------- /opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/api/KitchenService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, 2015 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.sample.kitchen.api; 9 | 10 | import com.google.common.util.concurrent.ListenableFuture; 11 | import org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.ToastType; 12 | import org.opendaylight.yangtools.yang.common.RpcResult; 13 | 14 | public interface KitchenService { 15 | 16 | ListenableFuture> makeBreakfast(EggsType eggs, ToastType toast, int toastDoneness); 17 | } 18 | -------------------------------------------------------------------------------- /opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/api/KitchenServiceRuntimeMXBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.sample.kitchen.api; 9 | 10 | /** 11 | * MXBean interface that provides attributes and operations for the kitchen service via JMX. 12 | * 13 | * @author Thomas Pantelis 14 | */ 15 | public interface KitchenServiceRuntimeMXBean { 16 | Boolean makeScrambledWithWheat(); 17 | } 18 | -------------------------------------------------------------------------------- /opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/ToasterProviderRuntimeMXBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.sample.toaster.provider; 9 | 10 | /** 11 | * MXBean interface that provides attributes and operations for the toaster via JMX. 12 | * 13 | * @author Thomas Pantelis 14 | */ 15 | public interface ToasterProviderRuntimeMXBean { 16 | Long getToastsMade(); 17 | 18 | void clearToastsMade(); 19 | } 20 | -------------------------------------------------------------------------------- /opendaylight/md-sal/samples/toaster/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.opendaylight.controller 7 | mdsal-parent 8 | 11.0.0-SNAPSHOT 9 | ../../parent 10 | 11 | 12 | org.opendaylight.controller.samples 13 | sample-toaster 14 | bundle 15 | 16 | 17 | -------------------------------------------------------------------------------- /pekko/repackaged-pekko-jar/src/main/resources/reference.conf: -------------------------------------------------------------------------------- 1 | include "actor_reference.conf" 2 | include "actor_typed_reference.conf" 3 | include "cluster_reference.conf" 4 | include "cluster_tools_reference.conf" 5 | include "cluster_typed_reference.conf" 6 | include "distributed_data_reference.conf" 7 | include "persistence_reference.conf" 8 | include "remote_reference.conf" 9 | include "stream_reference.conf" 10 | -------------------------------------------------------------------------------- /raft/raft-api/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | /** 9 | * RAFT APIs. 10 | */ 11 | module org.opendaylight.raft.api { 12 | exports org.opendaylight.raft.api; 13 | 14 | // Annotations 15 | requires static transitive java.management; 16 | requires static transitive org.eclipse.jdt.annotation; 17 | requires static org.osgi.annotation.bundle; 18 | } 19 | -------------------------------------------------------------------------------- /raft/raft-api/src/main/java/org/opendaylight/raft/api/EIv1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.raft.api; 9 | 10 | import java.io.Serializable; 11 | 12 | /** 13 | * Serialization proxy for {@link EntryInfo}. 14 | * 15 | * @param index log entry index 16 | * @param term log entry term 17 | */ 18 | record EIv1(long index, long term) implements Serializable { 19 | @java.io.Serial 20 | private Object readResolve() { 21 | return new EntryInfo(index, term); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /raft/raft-api/src/main/java/org/opendaylight/raft/api/EntryMeta.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.raft.api; 9 | 10 | /** 11 | * Information about a RAFT log entry. EntryInfo 12 | */ 13 | public interface EntryMeta { 14 | /** 15 | * Returns the index of the entry. 16 | * 17 | * @return the index 18 | */ 19 | long index(); 20 | 21 | /** 22 | * Returns the term of the entry. 23 | * 24 | * @return the term 25 | */ 26 | long term(); 27 | } 28 | -------------------------------------------------------------------------------- /raft/raft-api/src/main/java/org/opendaylight/raft/api/ServerRole.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.raft.api; 9 | 10 | /** 11 | * The role this server is playing in the RAFT protocol. 12 | */ 13 | public enum ServerRole { 14 | /** 15 | * A candidate server. 16 | */ 17 | CANDIDATE, 18 | /** 19 | * A follower server. 20 | */ 21 | FOLLOWER, 22 | /** 23 | * A leader server. 24 | */ 25 | LEADER 26 | } 27 | -------------------------------------------------------------------------------- /raft/raft-api/src/main/java/org/opendaylight/raft/api/TIv1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.raft.api; 9 | 10 | import java.io.Serializable; 11 | import org.eclipse.jdt.annotation.Nullable; 12 | 13 | /** 14 | * Serialization proxy for {@link TermInfo}. 15 | * 16 | * @param term log entry term 17 | * @param votedFor the member we have voted for, {@code null} if we have not voted for anyone 18 | */ 19 | record TIv1(long term, @Nullable String votedFor) implements Serializable { 20 | @java.io.Serial 21 | private Object readResolve() { 22 | return new TermInfo(term, votedFor); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /raft/raft-api/src/main/java/org/opendaylight/raft/api/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | /** 9 | * Classes that constitute what would be a RAFT protocol API. 10 | */ 11 | @org.osgi.annotation.bundle.Export 12 | package org.opendaylight.raft.api; -------------------------------------------------------------------------------- /raft/raft-journal/src/main/java/org/opendaylight/raft/journal/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | /** 17 | * Storage primitives for a RAFT journal. 18 | */ 19 | @org.osgi.annotation.bundle.Export 20 | package org.opendaylight.raft.journal; 21 | -------------------------------------------------------------------------------- /raft/raft-spi/bnd.bnd: -------------------------------------------------------------------------------- 1 | Import-Package: !org.checkerframework.*, * 2 | -------------------------------------------------------------------------------- /raft/raft-spi/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | /** 9 | * RAFT APIs. 10 | */ 11 | module org.opendaylight.raft.spi { 12 | exports org.opendaylight.raft.spi; 13 | 14 | requires transitive org.opendaylight.raft.api; 15 | requires com.google.common; 16 | requires org.lz4.java; 17 | requires org.slf4j; 18 | 19 | // Annotations 20 | requires static transitive org.eclipse.jdt.annotation; 21 | requires static org.checkerframework.checker.qual; 22 | requires static org.osgi.annotation.bundle; 23 | } 24 | -------------------------------------------------------------------------------- /raft/raft-spi/src/main/java/org/opendaylight/raft/spi/SizedDecompressLz4.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.raft.spi; 9 | 10 | import java.io.IOException; 11 | import java.io.InputStream; 12 | 13 | /** 14 | * A {@link SizedStreamSource} performing transparent LZ4 decompression of a backing {@link StreamSource}. 15 | */ 16 | record SizedDecompressLz4(UnsizedDecompressLz4 unsized, long size) implements SizedStreamSource { 17 | @Override 18 | public InputStream openStream() throws IOException { 19 | return unsized.openStream(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /raft/raft-spi/src/main/java/org/opendaylight/raft/spi/UnsizedStreamSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.raft.spi; 9 | 10 | import org.eclipse.jdt.annotation.NonNullByDefault; 11 | 12 | /** 13 | * A lazily-sources {@link StreamSource}. 14 | */ 15 | @NonNullByDefault 16 | public non-sealed interface UnsizedStreamSource extends StreamSource { 17 | // Nothing else 18 | } 19 | -------------------------------------------------------------------------------- /raft/raft-spi/src/main/java/org/opendaylight/raft/spi/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | /** 9 | * Classes that are helpful for implementing RAFT. 10 | */ 11 | @org.osgi.annotation.bundle.Export 12 | package org.opendaylight.raft.spi; -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/notifications/DefaultLeaderStateChanged.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.notifications; 9 | 10 | import static java.util.Objects.requireNonNull; 11 | 12 | import org.eclipse.jdt.annotation.NonNullByDefault; 13 | import org.eclipse.jdt.annotation.Nullable; 14 | 15 | /** 16 | * Default implementation of {@link LeaderStateChanged}. 17 | */ 18 | @NonNullByDefault 19 | public record DefaultLeaderStateChanged( 20 | String memberId, 21 | @Nullable String leaderId, 22 | short leaderPayloadVersion) implements LeaderStateChanged { 23 | public DefaultLeaderStateChanged { 24 | requireNonNull(memberId); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/notifications/LeaderStateChanged.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.notifications; 9 | 10 | import org.eclipse.jdt.annotation.NonNullByDefault; 11 | import org.eclipse.jdt.annotation.Nullable; 12 | 13 | /** 14 | * A local message initiated internally from the RaftActor when some state of a leader has changed. 15 | * 16 | * @author Thomas Pantelis 17 | */ 18 | @NonNullByDefault 19 | public sealed interface LeaderStateChanged extends MemberNotication 20 | permits DefaultLeaderStateChanged, ForwadingLeaderStateChanged { 21 | 22 | @Nullable String leaderId(); 23 | 24 | short leaderPayloadVersion(); 25 | } 26 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/notifications/MemberNotication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.notifications; 9 | 10 | /** 11 | * A notification about a member. 12 | */ 13 | public sealed interface MemberNotication permits LeaderStateChanged, RoleChanged { 14 | 15 | 16 | String memberId(); 17 | } 18 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/notifications/RegisterRoleChangeListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.notifications; 10 | 11 | import java.io.Serializable; 12 | 13 | /** 14 | * Message sent from the listener of Role Change messages to register itself to the Role Change Notifier. 15 | * The Listener could be in a separate ActorSystem and hence this message needs to be Serializable. 16 | */ 17 | public class RegisterRoleChangeListener implements Serializable { 18 | private static final long serialVersionUID = 8370459011119791506L; 19 | } 20 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/notifications/RegisterRoleChangeListenerReply.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.notifications; 10 | 11 | import java.io.Serializable; 12 | 13 | /** 14 | * Reply message sent from a RoleChangeNotifier to the Role Change Listener. 15 | * Can be sent to a separate actor system and hence should be made serializable. 16 | */ 17 | // FIXME: get a cookie or something? 18 | // FIXME: definitely final 19 | public class RegisterRoleChangeListenerReply implements Serializable { 20 | @java.io.Serial 21 | private static final long serialVersionUID = -1972061601184451430L; 22 | } 23 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/notifications/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | @org.osgi.annotation.bundle.Export 9 | package org.opendaylight.controller.cluster.notifications; 10 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/LeadershipTransferFailedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.raft; 10 | 11 | public class LeadershipTransferFailedException extends Exception { 12 | private static final long serialVersionUID = 1L; 13 | 14 | public LeadershipTransferFailedException(final String message) { 15 | super(message); 16 | } 17 | 18 | public LeadershipTransferFailedException(final String message, final Throwable cause) { 19 | super(message, cause); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/NoopPeerAddressResolver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft; 9 | 10 | /** 11 | * Implementation of PeerAddressResolver that does nothing. 12 | * 13 | * @author Thomas Pantelis 14 | */ 15 | public final class NoopPeerAddressResolver implements PeerAddressResolver { 16 | public static final NoopPeerAddressResolver INSTANCE = new NoopPeerAddressResolver(); 17 | 18 | private NoopPeerAddressResolver() { 19 | } 20 | 21 | @Override 22 | public String resolve(String peerId) { 23 | return null; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftVersions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft; 9 | 10 | /** 11 | * Enumerates the raft versions. 12 | * 13 | * @author Thomas Pantelis 14 | */ 15 | public final class RaftVersions { 16 | // HELIUM_VERSION = 0 17 | // LITHIUM_VERSION = 1 18 | // BORON_VERSION = 3 19 | public static final short FLUORINE_VERSION = 4; 20 | public static final short ARGON_VERSION = 5; 21 | public static final short CURRENT_VERSION = ARGON_VERSION; 22 | 23 | private RaftVersions() { 24 | // Hidden on purpose 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/VotingState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft; 9 | 10 | /** 11 | * Enumerates voting states for a peer. 12 | * 13 | * @author Thomas Pantelis 14 | */ 15 | public enum VotingState { 16 | VOTING, 17 | NON_VOTING, 18 | VOTING_NOT_INITIALIZED 19 | } 20 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/ElectionTimeout.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.raft.base.messages; 10 | 11 | import org.apache.pekko.dispatch.ControlMessage; 12 | 13 | /** 14 | * Local message sent to indicate the current election term has timed out. 15 | */ 16 | public final class ElectionTimeout implements ControlMessage { 17 | public static final ElectionTimeout INSTANCE = new ElectionTimeout(); 18 | 19 | private ElectionTimeout() { 20 | // Hidden on purpose 21 | } 22 | 23 | private Object readResolve() { 24 | return INSTANCE; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/InitiateCaptureSnapshot.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.raft.base.messages; 10 | 11 | public class InitiateCaptureSnapshot { 12 | } 13 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/Replicate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft.base.messages; 9 | 10 | import org.opendaylight.yangtools.concepts.Identifier; 11 | 12 | public record Replicate(long logIndex, boolean sendImmediate, Identifier identifier) { 13 | // Nothing else here 14 | } 15 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/base/messages/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | @org.osgi.annotation.bundle.Export 9 | package org.opendaylight.controller.cluster.raft.base.messages; 10 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/FollowerIdentifier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Inocybe Technologies and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft.behaviors; 9 | 10 | import org.opendaylight.yangtools.util.AbstractStringIdentifier; 11 | 12 | /** 13 | * An Identifier for a follower. 14 | * 15 | * @author Thomas Pantelis 16 | */ 17 | final class FollowerIdentifier extends AbstractStringIdentifier { 18 | @java.io.Serial 19 | private static final long serialVersionUID = 1L; 20 | 21 | FollowerIdentifier(final String followerId) { 22 | super(followerId); 23 | } 24 | 25 | @java.io.Serial 26 | private Object writeReplace() { 27 | return new FI(getValue()); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/behaviors/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | @org.osgi.annotation.bundle.Export 9 | package org.opendaylight.controller.cluster.raft.behaviors; 10 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/client/messages/GetOnDemandRaftState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft.client.messages; 9 | 10 | import org.apache.pekko.dispatch.ControlMessage; 11 | 12 | /** 13 | * Local message sent to a RaftActor to obtain a snapshot of statistical information. Returns an 14 | * OnDemandRaftState instance. 15 | * 16 | * @author Thomas Pantelis 17 | */ 18 | public final class GetOnDemandRaftState implements ControlMessage { 19 | public static final GetOnDemandRaftState INSTANCE = new GetOnDemandRaftState(); 20 | 21 | private GetOnDemandRaftState() { 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/client/messages/GetSnapshot.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft.client.messages; 9 | 10 | import org.eclipse.jdt.annotation.NonNullByDefault; 11 | 12 | /** 13 | * Internal client message to get a snapshot of the current state based on whether or not persistence is enabled. 14 | * Returns a {@link GetSnapshotReply} instance. 15 | * 16 | * @author Thomas Pantelis 17 | */ 18 | @NonNullByDefault 19 | public final class GetSnapshot { 20 | public static final GetSnapshot INSTANCE = new GetSnapshot(); 21 | 22 | private GetSnapshot() { 23 | // Hidden on purpose 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/client/messages/GetSnapshotReply.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft.client.messages; 9 | 10 | import static java.util.Objects.requireNonNull; 11 | 12 | import org.eclipse.jdt.annotation.NonNullByDefault; 13 | import org.opendaylight.controller.cluster.raft.persisted.Snapshot; 14 | 15 | /** 16 | * Reply to GetSnapshot that returns a serialized Snapshot instance. 17 | * 18 | * @author Thomas Pantelis 19 | */ 20 | @NonNullByDefault 21 | public record GetSnapshotReply(String id, Snapshot snapshot) { 22 | public GetSnapshotReply { 23 | requireNonNull(id); 24 | requireNonNull(snapshot); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/client/messages/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | @org.osgi.annotation.bundle.Export 9 | package org.opendaylight.controller.cluster.raft.client.messages; 10 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/AddServerReply.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft.messages; 9 | 10 | /** 11 | * Reply to an AddServer message (§4.1). 12 | * 13 | * @author Thomas Pantelis 14 | */ 15 | public final class AddServerReply extends AbstractServerChangeReply { 16 | private static final long serialVersionUID = 1L; 17 | 18 | public AddServerReply(ServerChangeStatus status, String leaderHint) { 19 | super(status, leaderHint); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/IdentifiablePayload.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft.messages; 9 | 10 | import org.opendaylight.controller.cluster.raft.spi.AbstractStateCommand; 11 | import org.opendaylight.yangtools.concepts.Identifiable; 12 | import org.opendaylight.yangtools.concepts.Identifier; 13 | 14 | public abstract class IdentifiablePayload extends AbstractStateCommand 15 | implements Identifiable { 16 | @java.io.Serial 17 | private static final long serialVersionUID = 1L; 18 | } 19 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/RemoveServerReply.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft.messages; 9 | 10 | import org.eclipse.jdt.annotation.Nullable; 11 | 12 | /** 13 | * Reply to a RemoveServer message (§4.1). 14 | */ 15 | public final class RemoveServerReply extends AbstractServerChangeReply { 16 | private static final long serialVersionUID = 1L; 17 | 18 | public RemoveServerReply(ServerChangeStatus status, @Nullable String leaderHint) { 19 | super(status, leaderHint); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/ServerChangeReply.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft.messages; 9 | 10 | /** 11 | * A general server change reply. 12 | * 13 | * @author Thomas Pantelis 14 | */ 15 | public class ServerChangeReply extends AbstractServerChangeReply { 16 | private static final long serialVersionUID = 1L; 17 | 18 | public ServerChangeReply(ServerChangeStatus status, String leaderHint) { 19 | super(status, leaderHint); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/messages/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | @org.osgi.annotation.bundle.Export 9 | package org.opendaylight.controller.cluster.raft.messages; 10 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | @org.osgi.annotation.bundle.Export 9 | // Needed for Class.forName() we use to instantiate RaftPolicy. It was originally introduce to deal with serialization 10 | // issues, so take needs to taken with testing in OSGi if this is to be removed. 11 | @org.osgi.annotation.bundle.Header(name = org.osgi.framework.Constants.DYNAMICIMPORT_PACKAGE, value = "*") 12 | package org.opendaylight.controller.cluster.raft; 13 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/persisted/LegacySerializable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft.persisted; 9 | 10 | /** 11 | * Marker interface for serializable objects which have been migrated. It implements {@link MigratedSerializable} and 12 | * always returns {@code true} from {@link #isMigrated()}. This interface is marked as deprecated , as any of its users 13 | * should also be marked as deprecated. 14 | */ 15 | @Deprecated 16 | public interface LegacySerializable extends MigratedSerializable { 17 | @Override 18 | @Deprecated(forRemoval = true) 19 | default boolean isMigrated() { 20 | return true; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/persisted/NP.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft.persisted; 9 | 10 | import java.io.Serializable; 11 | 12 | /** 13 | * Serialization proxy for {@link NoopPayload}. 14 | */ 15 | // There is no need for Externalizable 16 | final class NP implements Serializable { 17 | @java.io.Serial 18 | private static final long serialVersionUID = 1L; 19 | 20 | @java.io.Serial 21 | private Object readResolve() { 22 | return NoopPayload.INSTANCE; 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/persisted/PekkoPersistenceContract.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft.persisted; 9 | 10 | import org.opendaylight.controller.cluster.common.actor.AbstractUntypedPersistentActor; 11 | import org.opendaylight.controller.cluster.raft.RaftActor; 12 | 13 | /** 14 | * Marker interface for contracts related to Pekko persistence. Interfaces extending, and classes implementing, this 15 | * interface are to be removed when {@link RaftActor} stops extending {@link AbstractUntypedPersistentActor}. 16 | */ 17 | @Deprecated(since = "11.0.0", forRemoval = true) 18 | public interface PekkoPersistenceContract { 19 | // Nothing else 20 | } 21 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/persisted/ServerInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft.persisted; 9 | 10 | import static java.util.Objects.requireNonNull; 11 | 12 | import java.io.Serializable; 13 | import org.eclipse.jdt.annotation.NonNull; 14 | 15 | /** 16 | * Server information. This class is not directly Serializable, as it is serialized directly as part of 17 | * {@link ServerConfigurationPayload}. 18 | * 19 | * @author Thomas Pantelis 20 | */ 21 | public record ServerInfo(@NonNull String peerId, boolean isVoting) implements Serializable { 22 | public ServerInfo { 23 | requireNonNull(peerId); 24 | } 25 | } -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/persisted/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | @org.osgi.annotation.bundle.Export 9 | package org.opendaylight.controller.cluster.raft.persisted; 10 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/policy/DefaultRaftPolicy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.raft.policy; 10 | 11 | public class DefaultRaftPolicy implements RaftPolicy { 12 | 13 | public static final RaftPolicy INSTANCE = new DefaultRaftPolicy(); 14 | 15 | @Override 16 | public boolean automaticElectionsEnabled() { 17 | return true; 18 | } 19 | 20 | @Override 21 | public boolean applyModificationToStateBeforeConsensus() { 22 | return false; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/policy/DisableElectionsRaftPolicy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.raft.policy; 10 | 11 | /** 12 | * DisableElectionsRaftPolicy can be used for actors that does not 13 | * participate in shard election. Modification to state would 14 | * still require consensus. 15 | */ 16 | 17 | public class DisableElectionsRaftPolicy implements RaftPolicy { 18 | @Override 19 | public boolean automaticElectionsEnabled() { 20 | return false; 21 | } 22 | 23 | @Override 24 | public boolean applyModificationToStateBeforeConsensus() { 25 | return false; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/policy/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | @org.osgi.annotation.bundle.Export 9 | package org.opendaylight.controller.cluster.raft.policy; 10 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/spi/AbstractStateCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft.spi; 9 | 10 | import org.opendaylight.controller.cluster.raft.messages.Payload; 11 | 12 | /** 13 | * Abstract base class for {@link RaftCommand} implementations. 14 | */ 15 | public abstract non-sealed class AbstractStateCommand extends Payload implements StateCommand { 16 | @java.io.Serial 17 | private static final long serialVersionUID = 1L; 18 | } 19 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/spi/RaftCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft.spi; 9 | 10 | /** 11 | * An {@link StateMachineCommand} internal to the RAFT implementation, contributing towards forward progress in RAFT 12 | * journal maintenance. This includes changes in cluster configuration. 13 | */ 14 | public sealed interface RaftCommand extends StateMachineCommand permits AbstractRaftCommand { 15 | // Nothing else 16 | } 17 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/spi/StateCommand.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft.spi; 9 | 10 | /** 11 | * An individual change in RAFT-replicated user state. 12 | */ 13 | public non-sealed interface StateCommand extends StateMachineCommand { 14 | // Nothing else 15 | } 16 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/spi/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | /** 9 | * Various provider-level APIs for plugging into {@link org.opendaylight.controller.cluster.raft.RaftActor}. 10 | */ 11 | @org.osgi.annotation.bundle.Export 12 | package org.opendaylight.controller.cluster.raft.spi; -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/DoNothingActor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft; 9 | 10 | import org.apache.pekko.actor.UntypedAbstractActor; 11 | 12 | public class DoNothingActor extends UntypedAbstractActor { 13 | @Override 14 | public void onReceive(final Object message) throws Exception { 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/EchoActor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft; 9 | 10 | import org.apache.pekko.actor.UntypedAbstractActor; 11 | 12 | /** 13 | * The EchoActor simply responds back with the same message that it receives. 14 | */ 15 | public class EchoActor extends UntypedAbstractActor { 16 | @Override 17 | public void onReceive(final Object message) { 18 | getSender().tell(message, self()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/MockCommandProxy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft; 9 | 10 | import static java.util.Objects.requireNonNull; 11 | 12 | import java.io.Serializable; 13 | 14 | record MockCommandProxy(String value, int size) implements Serializable { 15 | MockCommandProxy { 16 | requireNonNull(value); 17 | } 18 | 19 | @java.io.Serial 20 | private Object readResolve() { 21 | return new MockCommand(value, size); 22 | } 23 | } -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/persisted/NoopPayloadTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft.persisted; 9 | 10 | import static org.junit.Assert.assertEquals; 11 | import static org.junit.Assert.assertSame; 12 | 13 | import org.apache.commons.lang3.SerializationUtils; 14 | import org.junit.Test; 15 | 16 | public class NoopPayloadTest { 17 | @Test 18 | public void testSerialization() { 19 | final var bytes = SerializationUtils.serialize(NoopPayload.INSTANCE); 20 | assertEquals(74, bytes.length); 21 | assertSame(NoopPayload.INSTANCE, SerializationUtils.deserialize(bytes)); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/policy/TestRaftPolicy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. 3 | * 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 7 | */ 8 | 9 | package org.opendaylight.controller.cluster.raft.policy; 10 | 11 | public class TestRaftPolicy implements RaftPolicy { 12 | 13 | @Override 14 | public boolean automaticElectionsEnabled() { 15 | return false; 16 | } 17 | 18 | @Override 19 | public boolean applyModificationToStateBeforeConsensus() { 20 | return false; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/spi/FailingTermInfoStore.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2025 PANTHEON.tech, s.r.o. and others. All rights reserved. 3 | * 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 7 | */ 8 | package org.opendaylight.controller.cluster.raft.spi; 9 | 10 | import org.eclipse.jdt.annotation.NonNullByDefault; 11 | import org.opendaylight.raft.api.TermInfo; 12 | 13 | @NonNullByDefault 14 | public final class FailingTermInfoStore extends AbstractTermInfoStore { 15 | public FailingTermInfoStore(final long term, final String votedFor) { 16 | super(term, votedFor); 17 | } 18 | 19 | @Override 20 | public void storeAndSetTerm(final TermInfo newTerm) { 21 | throw new UnsupportedOperationException(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/test/resources/helium-serialized-ReplicatedLogImplEntry: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendaylight/controller/ab5495df8a77754d55842c47fd5ecbda0b8b0127/raft/sal-akka-raft/src/test/resources/helium-serialized-ReplicatedLogImplEntry -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/test/resources/lithium-serialized-Snapshot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opendaylight/controller/ab5495df8a77754d55842c47fd5ecbda0b8b0127/raft/sal-akka-raft/src/test/resources/lithium-serialized-Snapshot -------------------------------------------------------------------------------- /raft/sal-akka-raft/src/test/resources/simplelogger.properties: -------------------------------------------------------------------------------- 1 | org.slf4j.simpleLogger.showDateTime=true 2 | org.slf4j.simpleLogger.dateTimeFormat=hh:mm:ss,S a 3 | org.slf4j.simpleLogger.logFile=System.out 4 | org.slf4j.simpleLogger.showShortLogName=true 5 | org.slf4j.simpleLogger.levelInBrackets=true 6 | org.slf4j.simpleLogger.log.org.opendaylight.controller.cluster.raft=debug -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | minversion = 1.6 3 | envlist = 4 | docs 5 | docs-linkcheck 6 | skipsdist = true 7 | 8 | [testenv:docs] 9 | deps = -rdocs/requirements.txt 10 | commands = 11 | sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html 12 | 13 | [testenv:docs-linkcheck] 14 | deps = -rdocs/requirements.txt 15 | commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck 16 | 17 | --------------------------------------------------------------------------------