From: Tony Tkacik Date: Mon, 7 Jul 2014 09:44:06 +0000 (+0000) Subject: Merge "Bug 560: Fixed Mount Point RPC registration service" X-Git-Tag: release/helium~523 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=55e562009629fcc7163f1f05261de4b2ce4b1e77;hp=cde200211e15c15312ee35944c03e88e80ceab55;p=controller.git Merge "Bug 560: Fixed Mount Point RPC registration service" --- diff --git a/features/adsal/pom.xml b/features/adsal/pom.xml new file mode 100644 index 0000000000..0ccb17a664 --- /dev/null +++ b/features/adsal/pom.xml @@ -0,0 +1,73 @@ + + + 4.0.0 + + org.opendaylight.controller + commons.opendaylight + 1.4.2-SNAPSHOT + ../../opendaylight/commons/opendaylight + + features-adsal + ${sal.version} + pom + Features :: AD-SAL Features + AD-SAL Features POM + + features.xml + + + + org.opendaylight.controller + base-features + ${project.parent.version} + features + xml + runtime + + + + + + true + src/main/resources + + + + + org.apache.maven.plugins + maven-resources-plugin + + + filter + + resources + + generate-resources + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + attach-artifacts + + attach-artifact + + package + + + + ${project.build.directory}/classes/${features.file} + xml + features + + + + + + + + + diff --git a/features/adsal/src/main/resources/features.xml b/features/adsal/src/main/resources/features.xml new file mode 100644 index 0000000000..f955315164 --- /dev/null +++ b/features/adsal/src/main/resources/features.xml @@ -0,0 +1,47 @@ + + + + odl-adsal-core + odl-adsal-networkconfiguration + odl-adsal-connection + odl-adsal-clustering + odl-adsal-configuration + + + base-felix-dm + base-dummy-console + odl-adsal-thirdparty + mvn:org.apache.commons/commons-lang3/${commons.lang3.version} + + mvn:org.opendaylight.controller/sal/${sal.version} + mvn:org.opendaylight.controller/sal.implementation/${sal.implementation.version} + + + mvn:org.opendaylight.controller/sal.networkconfiguration/${sal.networkconfiguration.version} + mvn:org.opendaylight.controller/sal.networkconfiguration.implementation/${sal.networkconfiguration.version} + + + odl-adsal-core + mvn:org.opendaylight.controller/sal.connection/${sal.connection.version} + mvn:org.opendaylight.controller/sal.connection.implementation/${sal.connection.version} + + + transaction + base-felix-dm + base-eclipselink-persistence + odl-adsal-core + mvn:org.opendaylight.controller/clustering.services/${clustering.services.version} + mvn:org.opendaylight.controller/clustering.services-implementation/${clustering.services_implementation.version} + mvn:org.opendaylight.controller/clustering.stub/${clustering.stub.version} + + + odl-adsal-core + odl-adsal-clustering + mvn:org.opendaylight.controller/configuration/${configuration.version} + mvn:org.opendaylight.controller/configuration.implementation/${configuration.implementation.version} + + + mvn:org.opendaylight.controller/logging.bridge/${logging.bridge.version} + + diff --git a/opendaylight/commons/opendaylight/pom.xml b/opendaylight/commons/opendaylight/pom.xml index de8caa0e67..3aeb2ccba7 100644 --- a/opendaylight/commons/opendaylight/pom.xml +++ b/opendaylight/commons/opendaylight/pom.xml @@ -43,7 +43,6 @@ 7.0.32.v201211201952 7.0.32.v201211201952 0.0.3-SNAPSHOT - 1.7 7.0.32.v201211201952 7.0.32.v201211081135 1.2.2 diff --git a/opendaylight/distribution/opendaylight-karaf/pom.xml b/opendaylight/distribution/opendaylight-karaf/pom.xml index 8a23a6b5e6..d8f6ba1526 100644 --- a/opendaylight/distribution/opendaylight-karaf/pom.xml +++ b/opendaylight/distribution/opendaylight-karaf/pom.xml @@ -22,6 +22,12 @@ ${karaf.version} kar + + org.opendaylight.controller + base-features + ${project.version} + kar + org.opendaylight.controller karaf.branding @@ -41,10 +47,13 @@ org.opendaylight.controller base-features - ${project.version} - kar + ${project.parent.version} + features + xml runtime + org.opendaylight.controller config-features @@ -53,23 +62,14 @@ xml runtime - - org.opendaylight.controller mdsal-features diff --git a/opendaylight/distribution/opendaylight/src/main/resources/configuration/initial/01-md-sal.xml b/opendaylight/distribution/opendaylight/src/main/resources/configuration/initial/01-md-sal.xml index afeddbfaab..38df344f85 100644 --- a/opendaylight/distribution/opendaylight/src/main/resources/configuration/initial/01-md-sal.xml +++ b/opendaylight/distribution/opendaylight/src/main/resources/configuration/initial/01-md-sal.xml @@ -51,6 +51,28 @@ + + + + prefix:inmemory-operational-datastore-provider operational-store-service @@ -59,7 +81,6 @@ yang-schema-service - + operational-dom-store-spi:operational-dom-datastore operational-store-service + + + @@ -126,6 +156,29 @@ /modules/module[type='schema-service-singleton'][name='yang-schema-service'] + + + + + + + + config-dom-store-spi:config-dom-datastore diff --git a/opendaylight/distribution/opendaylight/src/main/resources/functions.sh b/opendaylight/distribution/opendaylight/src/main/resources/functions.sh new file mode 100644 index 0000000000..21dd4c16ba --- /dev/null +++ b/opendaylight/distribution/opendaylight/src/main/resources/functions.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Function harvestHelp searches in run.sh part for line starting with "##". +# Next lines starting with "#" will be printed without first char # (=help content). +# Help content has to end with "##" on new line. +# Example: +##foo +# Foo is world wide used synnonym for bar. +## +function harvestHelp() { + key="$1" + if [ -z "${key}" ]; then + key='HELP' + fi + echo + sed -rn "/^##${key}$/,/^##/ p" $0 | sed -r '1 d; $ d; s/^#/ /' + grep "##${key}" $0 > /dev/null +} diff --git a/opendaylight/distribution/opendaylight/src/main/resources/run.bat b/opendaylight/distribution/opendaylight/src/main/resources/run.bat index 72ccd02707..ce13e33968 100644 --- a/opendaylight/distribution/opendaylight/src/main/resources/run.bat +++ b/opendaylight/distribution/opendaylight/src/main/resources/run.bat @@ -14,6 +14,7 @@ SET jvmMaxMemory= SET extraJVMOpts= SET consoleOpts=-console -consoleLog SET PID= +SET JAVA_H=%JAVA_HOME%\bin\jps.exe :LOOP IF "%~1" NEQ "" ( @@ -61,7 +62,7 @@ IF "%~1" NEQ "" ( GOTO :LOOP ) IF "!CARG!"=="-status" ( - for /F "TOKENS=1" %%G in ('%JAVA_HOME%\bin\jps.exe -lvV ^| find /I "opendaylight"') do ( + for /F "TOKENS=1" %%G in ('""!JAVA_H!" -lvV ^| find /I "opendaylight""') do ( set PID=%%G ) if "!PID!" NEQ "" ( @@ -72,7 +73,7 @@ IF "%~1" NEQ "" ( GOTO :EOF ) IF "!CARG!"=="-stop" ( - for /F "TOKENS=1" %%G in ('%JAVA_HOME%\bin\jps.exe -lvV ^| find /I "opendaylight"') do ( + for /F "TOKENS=1" %%G in ('""!JAVA_H!" -lvV ^| find /I "opendaylight""') do ( set PID=%%G ) if "!PID!" NEQ "" ( @@ -89,18 +90,23 @@ IF "%~1" NEQ "" ( GOTO :LOOP ) IF "!CARG:~0,2!"=="-D" ( - SET extraJVMOpts=%extraJVMOpts% !CARG! + SET extraJVMOpts=!extraJVMOpts! !CARG! SHIFT GOTO :LOOP ) IF "!CARG:~0,2!"=="-X" ( - SET extraJVMOpts=%extraJVMOpts% !CARG! + SET extraJVMOpts=!extraJVMOpts! !CARG! SHIFT GOTO :LOOP ) IF "!CARG!"=="-help" ( - ECHO "Usage: %0 [-jmx] [-jmxport ] [-debug] [-debugsuspend] [-debugport ] [-start] [-consoleport ]] [-stop] [-status] [-console] [-help] []" - ECHO Note: Enclose any JVM or System properties within double quotes. + SHIFT + SET CARG=%2 + IF "!CARG!" NEQ "" ( + CALL:!CARG! + ) ELSE ( + CALL:helper + ) GOTO :EOF ) @@ -110,28 +116,24 @@ IF "%~1" NEQ "" ( IF "%debugEnabled%" NEQ "" ( REM ECHO "DEBUG enabled" - SET extraJVMOpts=%extraJVMOpts% -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=%debugport% + SET extraJVMOpts=!extraJVMOpts! -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=%debugport% ) + IF "%debugSuspended%" NEQ "" ( REM ECHO "DEBUG enabled suspended" - SET extraJVMOpts=%extraJVMOpts% -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=%debugport% + SET extraJVMOpts=!extraJVMOpts! -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=%debugport% ) IF "%jvmMaxMemory%"=="" ( SET jvmMaxMemory=-Xmx1G - ECHO ***************************************************************** - ECHO JVM maximum memory was not defined. Setting maximum memory to 1G. - ECHO To define the maximum memory, specify the -Xmx setting on the - ECHO command line. - ECHO e.g. run.bat -Xmx1G - ECHO *****************************************************************" + ECHO Setting maximum memory to 1G. ) -SET extraJVMOpts=%extraJVMOpts% %jvmMaxMemory% +SET extraJVMOpts=!extraJVMOpts! %jvmMaxMemory% IF "%jmxEnabled%" NEQ "" ( REM ECHO "JMX enabled " - SET extraJVMOpts=%extraJVMOpts% -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=%jmxport% -Dcom.sun.management.jmxremote + SET extraJVMOpts=!extraJVMOpts! -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=%jmxport% -Dcom.sun.management.jmxremote ) IF "%startEnabled%" NEQ "" ( REM ECHO "START enabled " @@ -139,7 +141,7 @@ IF "%startEnabled%" NEQ "" ( ) REM Check if controller is already running -for /F "TOKENS=1" %%G in ('%JAVA_HOME%\bin\jps.exe -lvV ^| find /I "opendaylight"') do ( +for /F "TOKENS=1" %%G in ('""!JAVA_H!" -lvV ^| find /I "opendaylight""') do ( SET PID=%%G ) if "!PID!" NEQ "" ( @@ -154,16 +156,125 @@ SET cp="%basedir%lib\org.eclipse.osgi-3.8.1.v20120830-144521.jar;%basedir%lib\or REM Now set framework classpath SET fwcp="file:\%basedir%lib\org.eclipse.osgi-3.8.1.v20120830-144521.jar,file:\%basedir%lib\org.eclipse.virgo.kernel.equinox.extensions-3.6.0.RELEASE.jar,file:\%basedir%lib\org.eclipse.equinox.launcher-1.3.0.v20120522-1813.jar" -SET RUN_CMD="%JAVA_HOME%\bin\java.exe" -Dopendaylight.controller %extraJVMOpts% -Djava.io.tmpdir="%basedir%work\tmp" -Djava.awt.headless=true -Dosgi.install.area=%basedir% -Dosgi.configuration.area="%basedir%configuration" -Dosgi.frameworkClassPath=%fwcp% -Dosgi.framework="file:\%basedir%lib\org.eclipse.osgi-3.8.1.v20120830-144521.jar" -classpath %cp% org.eclipse.equinox.launcher.Main %consoleOpts% +SET RUN_CMD="%JAVA_HOME%\bin\java.exe" -Dopendaylight.controller !extraJVMOpts! -Djava.io.tmpdir="%basedir%work\tmp" -Djava.awt.headless=true -Dosgi.install.area=%basedir% -Dosgi.configuration.area="%basedir%configuration" -Dosgi.frameworkClassPath=%fwcp% -Dosgi.framework="file:\%basedir%lib\org.eclipse.osgi-3.8.1.v20120830-144521.jar" -classpath %cp% org.eclipse.equinox.launcher.Main %consoleOpts% -ECHO %RUN_CMD% +ECHO !RUN_CMD! if "%startEnabled%" NEQ "" ( - START /B cmd /C CALL %RUN_CMD% > %basedir%\logs\controller.out 2>&1 + START /B cmd /C CALL !RUN_CMD! > %basedir%\logs\controller.out 2>&1 ECHO Running controller in the background. + EXIT /B 1 ) else ( - %RUN_CMD% + !RUN_CMD! EXIT /B %ERRORLEVEL% ) +:helper +echo. For more information on a specific command, type -help command-name. +echo. +echo jmx ^[-jmx^] +echo jmxport ^[-jmxport ^^] - DEFAULT is 1088 +echo debug ^[-debug^] +echo debugsuspend ^[-debugsuspend^] +echo debugport ^[-debugport ^^] - DEFAULT is 8000 +echo start ^[-start ^[^^]^] - DEFAULT port is 2400 +echo stop ^[-stop^] +echo status ^[-status^] +echo console ^[-console^] +echo agentpath ^[-agentpath:^^] +exit/B 1 + +:debugsuspend +ECHO. +ECHO. debugsuspend ^[-debugsuspend^] +ECHO. +ECHO. This command sets suspend on true in runjdwp in extra JVM options. If its true, VMStartEvent has a suspendPolicy of SUSPEND_ALL. If its false, VMStartEvent has a suspendPolicy of SUSPEND_NONE. +ECHO. +EXIT /B 1 + +:debugport +ECHO. +ECHO. debugport ^[-debugport ^^] - DEFAULT is 8000 +ECHO. +ECHO. Set address for settings in runjdwp in extra JVM options. +ECHO. The address is transport address for the connection. +ECHO. The address has to be in the range ^[1024,65535^]. If the option was not call, port will be set to default value. +ECHO. +EXIT /B 1 + +:jmxport +ECHO. +ECHO. jmxport ^[-jmxport ^^] - DEFAULT is 1088 +ECHO. +ECHO. Set jmx port for com.sun.management.jmxremote.port in JMX support. Port has to be in the range ^[1024,65535^]. If this option was not call, port will be set to default value. +ECHO. +EXIT /B 1 + +:debug +ECHO. +ECHO. debug [-debug] +ECHO. +ECHO. Run ODL controller with -Xdebug and -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=^$^{debugport^} +ECHO. +ECHO. -Xdebug enables debugging capabilities in the JVM which are used by the Java Virtual Machine Tools Interface (JVMTI). JVMTI is a low-level debugging interface used by debuggers and profiling tools. +ECHO. +ECHO. -Xrunjdwp option loads the JPDA reference implementation of JDWP. This library resides in the target VM and uses JVMDI and JNI to interact with it. It uses a transport and the JDWP protocol to communicate with a separate debugger application. +ECHO. +ECHO. settings for -Xrunjdwp: +ECHO. transport - name of the transport to use in connecting to debugger application +ECHO. server - if 'y', listen for a debugger application to attach; otherwise, attach to the debugger application at the specified address +ECHO. - if 'y' and no address is specified, choose a transport address at which to listen for a debugger application, and print the address to the standard output stream +ECHO. suspend - if 'y', VMStartEvent has a suspend Policy of SUSPEND_ALL +ECHO. - if 'n', VMStartEvent has a suspend policy of SUSPEND_NONE +ECHO. address - transport address for the connection +ECHO. - if server=n, attempt to attach to debugger application at this address +ECHO. - if server=y, listen for a connection at this address +ECHO. +EXIT /B 1 + +:jmx +ECHO. +ECHO. jmx [-jmx] +ECHO. +ECHO. Add JMX support. With settings for extra JVM options: -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=^$^{jmxport^} -Dcom.sun.management.jmxremote +ECHO. jmxport can by set with option -jmxport ^. Default num for the option is 1088. +ECHO. +EXIT /B 1 + +:stop +ECHO. +ECHO. stop ^[-stop^] +ECHO. +ECHO. If a controller is running, the command stop controller. Pid will be clean. +ECHO. +EXIT /B 1 + +:status +ECHO. +ECHO. status ^[-status^] +ECHO. +ECHO. Find out whether a controller is running and print it. +ECHO. +EXIT /B 1 + +:start +ECHO. +ECHO. start ^[-start ^[^^]^] +ECHO. +ECHO. If controller is not running, the command with argument^(for set port, where controller has start^) will start new controller on a port. The port has to be in the range ^[1024,65535^]. If this option was not call, port will be set to default value. Pid will be create. +EXIT /B 1 + +:console +ECHO. +ECHO. console [-console] +ECHO. Default option. +EXIT /B 1 + +:agentpath +ECHO. +ECHO. agentpath ^[-agentpath:^^] +ECHO. +ECHO. Agentpath option passes path to agent to jvm in order to load native agent library, e.g. yourkit profiler agent. +EXIT /B 1 + diff --git a/opendaylight/distribution/opendaylight/src/main/resources/run.sh b/opendaylight/distribution/opendaylight/src/main/resources/run.sh index 1e903d0650..13be2336b6 100755 --- a/opendaylight/distribution/opendaylight/src/main/resources/run.sh +++ b/opendaylight/distribution/opendaylight/src/main/resources/run.sh @@ -1,5 +1,20 @@ #!/bin/bash +##HELP +# For more information on a specific command, type -help command-name. +# +# jmx [-jmx] +# jmxport [-jmxport ] - DEFAULT is 1088 +# debug [-debug] +# debugsuspend [-debugsuspend] +# debugport [-debugport ] - DEFAULT is 8000 +# start [-start []] - DEFAULT port is 2400 +# stop [-stop] +# status [-status] +# console [-console] +# agentpath [-agentpath:] +## + platform='unknown' unamestr=`uname` if [[ "$unamestr" == 'Linux' ]]; then @@ -58,11 +73,6 @@ else datadir=${ODL_DATADIR} fi -function usage { - echo "Usage: $0 [-jmx] [-jmxport ] [-debug] [-debugsuspend] [-debugport ] [-start []] [-stop] [-status] [-console] [-help] [-agentpath:] []" - exit 1 -} - if [ -z ${TMP} ]; then pidfile="/tmp/opendaylight.PID" else @@ -82,13 +92,15 @@ stopdaemon=0 statusdaemon=0 consolestart=1 dohelp=0 -jvmMaxMemory="" +jvmMaxMemory="-Xmx1G" extraJVMOpts="" agentPath="" unknown_option=0 +helper="" while true ; do case "$1" in -debug) debug=1; shift ;; + -help) dohelp=1; shift; helper=$1; break ;; -jmx) startjmx=1; shift ;; -debugsuspend) debugsuspend=1; shift ;; -debugport) shift; debugportread="$1"; if [[ "${debugportread}" =~ ^[0-9]+$ ]] ; then debugport=${debugportread}; shift; else echo "-debugport expects a number but was not found"; exit -1; fi;; @@ -97,37 +109,39 @@ while true ; do -stop) stopdaemon=1; shift ;; -status) statusdaemon=1; shift ;; -console) shift ;; - -help) dohelp=1; shift;; -Xmx*) jvmMaxMemory="$1"; shift;; -D*) extraJVMOpts="${extraJVMOpts} $1"; shift;; -X*) extraJVMOpts="${extraJVMOpts} $1"; shift;; -agentpath:*) agentPath="$1"; shift;; "") break ;; - *) echo "Unknown option $1"; unknown_option=1; shift ;; + *) echo "Unknown option $1"; unknown_option=1; break ;; esac done -# Unknown Options and help + + if [ "${unknown_option}" -eq 1 ]; then - usage + echo "Use -help for more information." + exit 1 fi -if [ "${dohelp}" -eq 1 ]; then - usage -fi -if [ "${jvmMaxMemory}" == "" ]; then - jvmMaxMemory="-Xmx1G" - echo "*****************************************************************" - echo "JVM maximum memory was not defined. Setting maximum memory to 1G." - echo "To define the maximum memory, specify the -Xmx setting on the" - echo "command line. " - echo " e.g. ./run.sh -Xmx1G" - echo "*****************************************************************" +if [ "${dohelp}" -eq 1 ]; then + . ${basedir}/functions.sh + harvestHelp ${helper} + echo -e '\nFor other information type -help.\n' + exit 1 fi extraJVMOpts="${extraJVMOpts} ${jvmMaxMemory}" +##debugport +#debugport [-debugport ] - DEFAULT is 8000 +# +# Set address for settings in runjdwp in extra JVM options. +# The address is transport address for the connection. +# The address has to be in the range [1024,65535]. If this option was not call, port will be set to default value. +## # Validate debug port if [[ "${debugport}" -lt 1024 ]] || [[ "${debugport}" -gt 65535 ]]; then echo "Debug Port not in the range [1024,65535] ${debugport}" @@ -140,19 +154,51 @@ if [[ "${daemonport}" -lt 1024 ]] || [[ "${daemonport}" -gt 65535 ]]; then exit -1 fi +##jmxport +#jmxport [-jmxport ] - DEFAULT is 1088 +# +# Set jmx port for com.sun.management.jmxremote.port in JMX support. Port has to be in the range [1024,65535]. If this option was not call, port will be set to default value. +## # Validate jmx port if [[ "${jmxport}" -lt 1024 ]] || [[ "${jmxport}" -gt 65535 ]]; then echo "JMX Port not in the range [1024,65535] value is ${jmxport}" exit -1 fi +##debug +#debug [-debug] +# +#Run ODL controller with -Xdebug and -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=\${debugport} +#-Xdebug enables debugging capabilities in the JVM which are used by the Java Virtual Machine Tools Interface (JVMTI). JVMTI is a low-level debugging interface used by debuggers and profiling tools. +#-Xrunjdwp option loads the JPDA reference implementation of JDWP. This library resides in the target VM and uses JVMDI and JNI to interact with it. It uses a transport and the JDWP protocol to +#communicate with a separate debugger application. +#settings for -Xrunjdwp: +# transport - name of the transport to use in connecting to debugger application +# server - if “y”, listen for a debugger application to attach; otherwise, attach to the debugger application at the specified address +# - if “y” and no address is specified, choose a transport address at which to listen for a debugger application, and print the address to the standard output stream +# suspend - if “y”, VMStartEvent has a suspend Policy of SUSPEND_ALL +# - if “n”, VMStartEvent has a suspend policy of SUSPEND_NONE +# address - transport address for the connection +# - if server=n, attempt to attach to debugger application at this address +# - if server=y, listen for a connection at this address +## +##debugsuspend +#debugsuspend [-debugsuspend] +# +#This command sets suspend on true in runjdwp in extra JVM options. If its true, VMStartEvent has a suspendPolicy of SUSPEND_ALL. If its false, VMStartEvent has a suspendPolicy of SUSPEND_NONE. +## # Debug options if [ "${debugsuspend}" -eq 1 ]; then extraJVMOpts="${extraJVMOpts} -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=${debugport}" elif [ "${debug}" -eq 1 ]; then extraJVMOpts="${extraJVMOpts} -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${debugport}" fi - +##jmx +#jmx [-jmx] +# +#Add JMX support. With settings for extra JVM options: -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=\${jmxport} -Dcom.sun.management.jmxremote +#jmxport can by set with command -jmxport . Default num for the option is 1088. +## # Add JMX support if [ "${startjmx}" -eq 1 ]; then extraJVMOpts="${extraJVMOpts} -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=${jmxport} -Dcom.sun.management.jmxremote" @@ -182,6 +228,11 @@ FWCLASSPATH=${FWCLASSPATH},file:${basedir}/lib/org.eclipse.equinox.launcher-1.3. cd $basedir +##stop +#stop [-stop] +# +#If a controller is running, the command stop controller. Pid will be clean. +## if [ "${stopdaemon}" -eq 1 ]; then if [ -e "${pidfile}" ]; then daemonpid=`cat "${pidfile}"` @@ -195,6 +246,11 @@ if [ "${stopdaemon}" -eq 1 ]; then fi fi +##status +#status [-status] +# +#Find out whether a controller is running and print it. +## if [ "${statusdaemon}" -eq 1 ]; then if [ -e "${pidfile}" ]; then daemonpid=`cat "${pidfile}"` @@ -219,6 +275,22 @@ bdir=`echo "${basedir}" | sed 's/ /\\ /g'` confarea=`echo "${datadir}" | sed 's/ /\\ /g'` fwclasspath=`echo "${FWCLASSPATH}" | sed 's/ /\\ /g'` +##start +#start [-start []] +# +# If controller is not running, the command with argument(for set port, where controller has start) will start new controller on a port. The port has to be in the range [1024,65535]. If this option was not call, port will be set to default value. Pid will be create. +## +##console +#console [-console] +# +# Default option. +## +##agentpath +#agentpath [-agentpath:] +# +# Agentpath option passes path to agent to jvm in order to load native agent library, e.g. yourkit profiler agent. +## +echo "JVM maximum memory was set to ${jvmMaxMemory}." if [ "${startdaemon}" -eq 1 ]; then if [ -e "${pidfile}" ]; then echo "Another instance of controller running, check with $0 -status" diff --git a/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/FromSalConversionsUtils.java b/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/FromSalConversionsUtils.java index 36045cabf4..1b648dc98c 100644 --- a/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/FromSalConversionsUtils.java +++ b/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/FromSalConversionsUtils.java @@ -103,7 +103,8 @@ public class FromSalConversionsUtils { private static NodeConnectorId inPortMatch(Match sourceMatch) { MatchField inPort = sourceMatch.getField(MatchType.IN_PORT); if(inPort != null && inPort.getValue() != null && (inPort.getValue() instanceof NodeConnector)) { - return new NodeConnectorId(((NodeConnector) inPort.getValue()).getNodeConnectorIdAsString()); + NodeConnector port = (NodeConnector)inPort.getValue(); + return (NodeConnectorId)MDFlowMapping.toUri(port); } return null; } @@ -203,9 +204,11 @@ public class FromSalConversionsUtils { MatchField vlan = sourceMatch.getField(MatchType.DL_VLAN); if (vlan != null && vlan.getValue() != null) { VlanIdBuilder vlanIDBuilder = new VlanIdBuilder(); + short vid = (short)vlan.getValue(); + boolean present = (vid != MatchType.DL_VLAN_NONE); vlanIDBuilder.setVlanId(new VlanId((NetUtils - .getUnsignedShort((short) vlan.getValue())))); - vlanIDBuilder.setVlanIdPresent(true); + .getUnsignedShort(vid)))); + vlanIDBuilder.setVlanIdPresent(present); vlanMatchBuild.setVlanId(vlanIDBuilder.build()); } diff --git a/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/NodeMapping.java b/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/NodeMapping.java index a700c86b9c..02964c6d55 100644 --- a/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/NodeMapping.java +++ b/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/NodeMapping.java @@ -11,6 +11,7 @@ import java.math.BigInteger; import java.util.Date; import java.util.HashSet; import java.util.List; + import org.opendaylight.controller.sal.common.util.Arguments; import org.opendaylight.controller.sal.core.AdvertisedBandwidth; import org.opendaylight.controller.sal.core.Bandwidth; @@ -61,6 +62,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Objects; import com.google.common.base.Preconditions; @@ -94,13 +96,14 @@ public final class NodeMapping { /** * @param adNodeId - * @return + * @return nodeId as long */ - private static Long openflowFullNodeIdToLong(String adNodeId) { + @VisibleForTesting + public static Long openflowFullNodeIdToLong(String adNodeId) { if (adNodeId == null) { return null; } - return Long.valueOf(adNodeId.replaceFirst("^.*:", "")); + return new BigInteger(adNodeId.replaceFirst("^.*:", "")).longValue(); } public static NodeId toNodeId(final InstanceIdentifier id) { diff --git a/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/ToSalConversionsUtils.java b/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/ToSalConversionsUtils.java index 7bbf7f10e0..58cfb20650 100644 --- a/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/ToSalConversionsUtils.java +++ b/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/ToSalConversionsUtils.java @@ -430,13 +430,17 @@ public class ToSalConversionsUtils { if (vlanMatch != null) { VlanId vlanId = vlanMatch.getVlanId(); if (vlanId != null) { - org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId vlanIdInner = vlanId - .getVlanId(); - if (vlanIdInner != null) { - Integer vlanValue = vlanIdInner.getValue(); - if (vlanValue != null) { - target.setField(DL_VLAN, vlanValue.shortValue()); + if (Boolean.TRUE.equals(vlanId.isVlanIdPresent())) { + org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId vlanIdInner = vlanId + .getVlanId(); + if (vlanIdInner != null) { + Integer vlanValue = vlanIdInner.getValue(); + if (vlanValue != null) { + target.setField(DL_VLAN, vlanValue.shortValue()); + } } + } else { + target.setField(DL_VLAN, MatchType.DL_VLAN_NONE); } } VlanPcp vlanPcp = vlanMatch.getVlanPcp(); diff --git a/opendaylight/md-sal/compatibility/sal-compatibility/src/test/java/org/opendaylight/controller/sal/compatibility/test/NodeMappingTest.java b/opendaylight/md-sal/compatibility/sal-compatibility/src/test/java/org/opendaylight/controller/sal/compatibility/test/NodeMappingTest.java index 8a23ebc933..cef7ae7a42 100644 --- a/opendaylight/md-sal/compatibility/sal-compatibility/src/test/java/org/opendaylight/controller/sal/compatibility/test/NodeMappingTest.java +++ b/opendaylight/md-sal/compatibility/sal-compatibility/src/test/java/org/opendaylight/controller/sal/compatibility/test/NodeMappingTest.java @@ -174,6 +174,18 @@ public class NodeMappingTest { Assert.assertEquals("openflow:1", observedNodeConnectorId); } + /** + * Test method for + * {@link org.opendaylight.controller.sal.compatibility.NodeMapping#openflowFullNodeIdToLong(String)} + * . + * @throws ConstructionException + */ + @Test + public void testOpenflowFullNodeIdToLong() throws ConstructionException { + Assert.assertEquals(42L, NodeMapping.openflowFullNodeIdToLong("42").longValue()); + Assert.assertEquals(0xCC4E241C4A000000L, NodeMapping.openflowFullNodeIdToLong("14721743935839928320").longValue()); + } + /** * @param nodeId * @param portId diff --git a/opendaylight/md-sal/compatibility/sal-compatibility/src/test/java/org/opendaylight/controller/sal/compatibility/test/TestFromSalConversionsUtils.java b/opendaylight/md-sal/compatibility/sal-compatibility/src/test/java/org/opendaylight/controller/sal/compatibility/test/TestFromSalConversionsUtils.java index 5d5a409445..b6e611bf11 100644 --- a/opendaylight/md-sal/compatibility/sal-compatibility/src/test/java/org/opendaylight/controller/sal/compatibility/test/TestFromSalConversionsUtils.java +++ b/opendaylight/md-sal/compatibility/sal-compatibility/src/test/java/org/opendaylight/controller/sal/compatibility/test/TestFromSalConversionsUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013-2014 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -41,6 +41,11 @@ import org.opendaylight.controller.sal.action.SetVlanPcp; import org.opendaylight.controller.sal.action.SwPath; import org.opendaylight.controller.sal.compatibility.MDFlowMapping; import org.opendaylight.controller.sal.compatibility.ToSalConversionsUtils; +import org.opendaylight.controller.sal.core.ConstructionException; +import org.opendaylight.controller.sal.core.Node; +import org.opendaylight.controller.sal.core.Node.NodeIDType; +import org.opendaylight.controller.sal.core.NodeConnector; +import org.opendaylight.controller.sal.core.NodeConnector.NodeConnectorIDType; import org.opendaylight.controller.sal.flowprogrammer.Flow; import org.opendaylight.controller.sal.match.Match; import org.opendaylight.controller.sal.match.MatchType; @@ -79,11 +84,11 @@ import com.google.common.net.InetAddresses; public class TestFromSalConversionsUtils { private enum MtchType { - other, ipv4, ipv6, arp, sctp, tcp, udp + other, untagged, ipv4, ipv6, arp, sctp, tcp, udp } @Test - public void testFromSalConversion() { + public void testFromSalConversion() throws ConstructionException { Flow salFlow = prepareSalFlowCommon(); NodeFlow odNodeFlow = MDFlowMapping.flowAdded(salFlow); @@ -93,6 +98,9 @@ public class TestFromSalConversionsUtils { odNodeFlow = MDFlowMapping.flowAdded(prepareSalMatch(salFlow, MtchType.other)); checkOdMatch(odNodeFlow.getMatch(), MtchType.other); + odNodeFlow = MDFlowMapping.flowAdded(prepareSalMatch(salFlow, MtchType.untagged)); + checkOdMatch(odNodeFlow.getMatch(), MtchType.untagged); + odNodeFlow = MDFlowMapping.flowAdded(prepareSalMatch(salFlow, MtchType.arp)); checkOdMatch(odNodeFlow.getMatch(), MtchType.arp); @@ -160,15 +168,26 @@ public class TestFromSalConversionsUtils { assertNotNull("Ipv6 wasn't found", ipv6Found); break; case other: + assertEquals("Incoming port is wrong.", "openflow:12345:10", match.getInPort().getValue()); assertEquals("Source MAC address is wrong.", "ff:ee:dd:cc:bb:aa", match.getEthernetMatch() .getEthernetSource().getAddress().getValue()); assertEquals("Destinatio MAC address is wrong.", "ff:ee:dd:cc:bb:aa", match.getEthernetMatch() .getEthernetDestination().getAddress().getValue()); + assertEquals("Vlan ID is not present.", Boolean.TRUE, match.getVlanMatch().getVlanId().isVlanIdPresent()); assertEquals("Vlan ID is wrong.", (Integer) 0xfff, match.getVlanMatch().getVlanId().getVlanId().getValue()); assertEquals("Vlan ID priority is wrong.", (short) 0x7, (short) match.getVlanMatch().getVlanPcp() .getValue()); assertEquals("DCSP is wrong.", (short) 0x3f, (short) match.getIpMatch().getIpDscp().getValue()); break; + case untagged: + assertEquals("Source MAC address is wrong.", "ff:ee:dd:cc:bb:aa", match.getEthernetMatch() + .getEthernetSource().getAddress().getValue()); + assertEquals("Destinatio MAC address is wrong.", "ff:ee:dd:cc:bb:aa", match.getEthernetMatch() + .getEthernetDestination().getAddress().getValue()); + assertEquals("Vlan ID is present.", Boolean.FALSE, match.getVlanMatch().getVlanId().isVlanIdPresent()); + assertEquals("Vlan ID is wrong.", Integer.valueOf(0), match.getVlanMatch().getVlanId().getVlanId().getValue()); + assertEquals("DCSP is wrong.", (short) 0x3f, (short) match.getIpMatch().getIpDscp().getValue()); + break; case sctp: boolean sctpFound = false; assertEquals("Wrong protocol", CRUDP, match.getIpMatch().getIpProtocol().byteValue()); @@ -334,7 +353,7 @@ public class TestFromSalConversionsUtils { return salFlow; } - private Flow prepareSalMatch(Flow salFlow, MtchType mt) { + private Flow prepareSalMatch(Flow salFlow, MtchType mt) throws ConstructionException { Match salMatch = new Match(); switch (mt) { case arp: @@ -355,12 +374,21 @@ public class TestFromSalConversionsUtils { salMatch.setField(MatchType.NW_DST, InetAddresses.forString("2001:0db8:85a3:0000:0000:8a2e:0370:7336")); break; case other: + Node node = new Node(NodeIDType.OPENFLOW, 12345L); + NodeConnector port = new NodeConnector(NodeConnectorIDType.OPENFLOW, Short.valueOf((short)10), node); + salMatch.setField(MatchType.IN_PORT, port); salMatch.setField(MatchType.DL_SRC, new byte[]{(byte )0xff,(byte )0xee,(byte )0xdd,(byte )0xcc,(byte )0xbb,(byte )0xaa}); salMatch.setField(MatchType.DL_DST, new byte[]{(byte )0xff,(byte )0xee,(byte )0xdd,(byte )0xcc,(byte )0xbb,(byte )0xaa}); salMatch.setField(MatchType.DL_VLAN, (short) 0xfff); salMatch.setField(MatchType.DL_VLAN_PR, (byte) 0x7); salMatch.setField(MatchType.NW_TOS, (byte) 0x3f); break; + case untagged: + salMatch.setField(MatchType.DL_SRC, new byte[]{(byte )0xff,(byte )0xee,(byte )0xdd,(byte )0xcc,(byte )0xbb,(byte )0xaa}); + salMatch.setField(MatchType.DL_DST, new byte[]{(byte )0xff,(byte )0xee,(byte )0xdd,(byte )0xcc,(byte )0xbb,(byte )0xaa}); + salMatch.setField(MatchType.DL_VLAN, MatchType.DL_VLAN_NONE); + salMatch.setField(MatchType.NW_TOS, (byte) 0x3f); + break; case sctp: salMatch.setField(MatchType.NW_PROTO, CRUDP); salMatch.setField(MatchType.TP_SRC, (short) 0xffff); diff --git a/opendaylight/md-sal/compatibility/sal-compatibility/src/test/java/org/opendaylight/controller/sal/compatibility/test/TestToSalConversionsUtils.java b/opendaylight/md-sal/compatibility/sal-compatibility/src/test/java/org/opendaylight/controller/sal/compatibility/test/TestToSalConversionsUtils.java index 0157bc0c64..7601a7d9cf 100644 --- a/opendaylight/md-sal/compatibility/sal-compatibility/src/test/java/org/opendaylight/controller/sal/compatibility/test/TestToSalConversionsUtils.java +++ b/opendaylight/md-sal/compatibility/sal-compatibility/src/test/java/org/opendaylight/controller/sal/compatibility/test/TestToSalConversionsUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013-2014 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -50,6 +50,7 @@ import org.opendaylight.controller.sal.core.ConstructionException; import org.opendaylight.controller.sal.core.Node; import org.opendaylight.controller.sal.core.Node.NodeIDType; import org.opendaylight.controller.sal.core.NodeConnector; +import org.opendaylight.controller.sal.core.NodeConnector.NodeConnectorIDType; import org.opendaylight.controller.sal.flowprogrammer.Flow; import org.opendaylight.controller.sal.match.MatchType; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Dscp; @@ -118,6 +119,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instru import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.apply.actions._case.ApplyActionsBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId; import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.EtherType; import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId; import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanPcp; @@ -151,7 +153,7 @@ public class TestToSalConversionsUtils { // prefix: // od|Od = Open Daylight private enum MtchType { - other, ipv4, ipv6, arp, sctp, tcp, udp + other, untagged, ipv4, ipv6, arp, sctp, tcp, udp } @Test @@ -164,6 +166,9 @@ public class TestToSalConversionsUtils { Flow salFlow = ToSalConversionsUtils.toFlow(prepareOdFlow(odNodeFlowBuilder, MtchType.other), node); checkSalMatch(salFlow.getMatch(), MtchType.other); + salFlow = ToSalConversionsUtils.toFlow(prepareOdFlow(odNodeFlowBuilder, MtchType.untagged), node); + checkSalMatch(salFlow.getMatch(), MtchType.untagged); + salFlow = ToSalConversionsUtils.toFlow(prepareOdFlow(odNodeFlowBuilder, MtchType.ipv4), node); checkSalMatch(salFlow.getMatch(), MtchType.ipv4); @@ -196,7 +201,7 @@ public class TestToSalConversionsUtils { Assert.assertEquals("OF|1@OF|00:00:00:00:00:00:00:2a", nodeConnector.toString()); } - private void checkSalMatch(org.opendaylight.controller.sal.match.Match match, MtchType mt) { + private void checkSalMatch(org.opendaylight.controller.sal.match.Match match, MtchType mt) throws ConstructionException { switch (mt) { case other: /*assertNotNull("DL_DST isn't equal.", "3C:A9:F4:00:E0:C8", @@ -204,12 +209,21 @@ public class TestToSalConversionsUtils { assertEquals("DL_SRC isn't equal.", "24:77:03:7C:C5:F1", new String((byte[]) match.getField(MatchType.DL_SRC).getValue())); */ + Node node = new Node(NodeIDType.OPENFLOW, 12L); + NodeConnector port = new NodeConnector(NodeConnectorIDType.OPENFLOW, Short.valueOf((short)345), node); + assertEquals("IN_PORT isn't equal.", port, match.getField(MatchType.IN_PORT).getValue()); assertEquals("DL_TYPE isn't equal.", (short) 0xffff, (short) match.getField(MatchType.DL_TYPE).getValue()); assertEquals("NW_TOS isn't equal.", (byte) 0x33, (byte) match.getField(MatchType.NW_TOS).getValue()); assertEquals("NW_PROTO isn't equal.", (byte) 0x3f, (byte) match.getField(MatchType.NW_PROTO).getValue()); assertEquals("DL_VLAN isn't equal.", (short) 0xfff, (short) match.getField(MatchType.DL_VLAN).getValue()); assertEquals("DL_VLAN_PR isn't equal.", (byte) 0x7, (byte) match.getField(MatchType.DL_VLAN_PR).getValue()); break; + case untagged: + assertEquals("DL_TYPE isn't equal.", (short) 0xffff, (short) match.getField(MatchType.DL_TYPE).getValue()); + assertEquals("NW_TOS isn't equal.", (byte) 0x33, (byte) match.getField(MatchType.NW_TOS).getValue()); + assertEquals("NW_PROTO isn't equal.", (byte) 0x3f, (byte) match.getField(MatchType.NW_PROTO).getValue()); + assertEquals("DL_VLAN isn't equal.", MatchType.DL_VLAN_NONE, (short) match.getField(MatchType.DL_VLAN).getValue()); + break; case arp: /* assertEquals("DL_SRC isn't equal.", "22:44:66:88:AA:CC", @@ -578,10 +592,16 @@ public class TestToSalConversionsUtils { MatchBuilder odMatchBuilder = new MatchBuilder(); switch (mt) { case other: + odMatchBuilder.setInPort(new NodeConnectorId("openflow:12:345")); odMatchBuilder.setEthernetMatch(prepEthernetMatch()); odMatchBuilder.setIpMatch(prepIpMatch()); odMatchBuilder.setVlanMatch(prepVlanMatch()); break; + case untagged: + odMatchBuilder.setEthernetMatch(prepEthernetMatch()); + odMatchBuilder.setIpMatch(prepIpMatch()); + odMatchBuilder.setVlanMatch(prepVlanNoneMatch()); + break; case ipv4: odMatchBuilder.setLayer3Match(prepLayer3MatchIpv4()); break; @@ -664,11 +684,20 @@ public class TestToSalConversionsUtils { VlanMatchBuilder vlanMatchBuilder = new VlanMatchBuilder(); VlanIdBuilder vlanIdBuilder = new VlanIdBuilder().setVlanId(new VlanId(0xfff)); - vlanMatchBuilder.setVlanId(vlanIdBuilder.build()); + vlanMatchBuilder.setVlanId(vlanIdBuilder.setVlanIdPresent(true).build()); vlanMatchBuilder.setVlanPcp(new VlanPcp((short) 0x7)); return vlanMatchBuilder.build(); + } + + private VlanMatch prepVlanNoneMatch() { + VlanMatchBuilder vlanMatchBuilder = new VlanMatchBuilder(); + VlanIdBuilder vlanIdBuilder = new VlanIdBuilder(). + setVlanIdPresent(false); + vlanMatchBuilder.setVlanId(vlanIdBuilder.build()); + + return vlanMatchBuilder.build(); } private IpMatch prepIpMatch() { diff --git a/opendaylight/md-sal/sal-distributed-datastore/pom.xml b/opendaylight/md-sal/sal-distributed-datastore/pom.xml index ea686d966f..5152363ab2 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/pom.xml +++ b/opendaylight/md-sal/sal-distributed-datastore/pom.xml @@ -57,15 +57,20 @@ sal-binding-config - org.opendaylight.controller - sal-broker-impl + sal-inmemory-datastore + 1.1-SNAPSHOT @@ -131,6 +136,7 @@ ${slf4j.version} test + @@ -145,6 +151,21 @@ ${project.groupId}.${project.artifactId} + !*snappy;!org.jboss.*;* + + !sal*; + !*config-api*; + !*testkit*; + akka*; + *leveldb*; + *config*; + *hawt*; + *protobuf*; + *netty*; + *uncommons*; + *scala*; + + true diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractUntypedActor.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractUntypedActor.java new file mode 100644 index 0000000000..0f10258e9e --- /dev/null +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractUntypedActor.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.controller.cluster.datastore; + +import akka.actor.UntypedActor; +import akka.event.Logging; +import akka.event.LoggingAdapter; +import org.opendaylight.controller.cluster.datastore.messages.Monitor; + +public abstract class AbstractUntypedActor extends UntypedActor { + protected final LoggingAdapter LOG = + Logging.getLogger(getContext().system(), this); + + + public AbstractUntypedActor(){ + LOG.debug("Actor created {}", getSelf()); + getContext(). + system(). + actorSelection("user/termination-monitor"). + tell(new Monitor(getSelf()), getSelf()); + } + + @Override public void onReceive(Object message) throws Exception { + LOG.debug("Received message {}", message); + handleReceive(message); + LOG.debug("Done handling message {}", message); + } + + protected abstract void handleReceive(Object message) throws Exception; +} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ActorSystemFactory.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ActorSystemFactory.java new file mode 100644 index 0000000000..baf04fe43b --- /dev/null +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ActorSystemFactory.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.controller.cluster.datastore; + +import akka.actor.ActorSystem; +import akka.actor.Props; +import com.google.common.base.Function; +import com.typesafe.config.ConfigFactory; + +import javax.annotation.Nullable; + +public class ActorSystemFactory { + private static final ActorSystem actorSystem = (new Function(){ + + @Nullable @Override public ActorSystem apply(@Nullable Void aVoid) { + ActorSystem system = + ActorSystem.create("opendaylight-cluster", ConfigFactory + .load().getConfig("ODLCluster")); + system.actorOf(Props.create(TerminationMonitor.class), "termination-monitor"); + return system; + } + }).apply(null); + + public static final ActorSystem getInstance(){ + return actorSystem; + } +} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataChangeListener.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataChangeListener.java index ba09d04025..fd4f9f75b5 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataChangeListener.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataChangeListener.java @@ -9,19 +9,41 @@ package org.opendaylight.controller.cluster.datastore; import akka.actor.Props; -import akka.actor.UntypedActor; import akka.japi.Creator; +import org.opendaylight.controller.cluster.datastore.messages.DataChanged; +import org.opendaylight.controller.cluster.datastore.messages.DataChangedReply; +import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent; +import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeListener; +import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; +import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; -public class DataChangeListener extends UntypedActor { - @Override public void onReceive(Object message) throws Exception { - throw new UnsupportedOperationException("onReceive"); +public class DataChangeListener extends AbstractUntypedActor { + private final AsyncDataChangeListener> listener; + + public DataChangeListener( + AsyncDataChangeListener> listener) { + this.listener = listener; + } + + @Override public void handleReceive(Object message) throws Exception { + if(message instanceof DataChanged){ + DataChanged reply = (DataChanged) message; + AsyncDataChangeEvent> + change = reply.getChange(); + this.listener.onDataChanged(change); + + if(getSender() != null){ + getSender().tell(new DataChangedReply(), getSelf()); + } + + } } - public static Props props() { + public static Props props(final AsyncDataChangeListener> listener) { return Props.create(new Creator() { @Override public DataChangeListener create() throws Exception { - return new DataChangeListener(); + return new DataChangeListener(listener); } }); diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistration.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistration.java index e90d53c69c..dca9735487 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistration.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistration.java @@ -8,8 +8,8 @@ package org.opendaylight.controller.cluster.datastore; +import akka.actor.PoisonPill; import akka.actor.Props; -import akka.actor.UntypedActor; import akka.japi.Creator; import org.opendaylight.controller.cluster.datastore.messages.CloseDataChangeListenerRegistration; import org.opendaylight.controller.cluster.datastore.messages.CloseDataChangeListenerRegistrationReply; @@ -17,34 +17,40 @@ import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeListene import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; -public class DataChangeListenerRegistration extends UntypedActor{ +public class DataChangeListenerRegistration extends AbstractUntypedActor { - private final org.opendaylight.yangtools.concepts.ListenerRegistration>> registration; + private final org.opendaylight.yangtools.concepts.ListenerRegistration>> + registration; - public DataChangeListenerRegistration( - org.opendaylight.yangtools.concepts.ListenerRegistration>> registration) { - this.registration = registration; - } + public DataChangeListenerRegistration( + org.opendaylight.yangtools.concepts.ListenerRegistration>> registration) { + this.registration = registration; + } + + @Override + public void handleReceive(Object message) throws Exception { + if (message instanceof CloseDataChangeListenerRegistration) { + closeListenerRegistration( + (CloseDataChangeListenerRegistration) message); + } + } + + public static Props props( + final org.opendaylight.yangtools.concepts.ListenerRegistration>> registration) { + return Props.create(new Creator() { + + @Override + public DataChangeListenerRegistration create() throws Exception { + return new DataChangeListenerRegistration(registration); + } + }); + } - @Override - public void onReceive(Object message) throws Exception { - if(message instanceof CloseDataChangeListenerRegistration){ - closeListenerRegistration((CloseDataChangeListenerRegistration) message); + private void closeListenerRegistration( + CloseDataChangeListenerRegistration message) { + registration.close(); + getSender() + .tell(new CloseDataChangeListenerRegistrationReply(), getSelf()); + getSelf().tell(PoisonPill.getInstance(), getSelf()); } - } - - public static Props props(final org.opendaylight.yangtools.concepts.ListenerRegistration>> registration){ - return Props.create(new Creator(){ - - @Override - public DataChangeListenerRegistration create() throws Exception { - return new DataChangeListenerRegistration(registration); - } - }); - } - - private void closeListenerRegistration(CloseDataChangeListenerRegistration message){ - registration.close(); - getSender().tell(new CloseDataChangeListenerRegistrationReply(), getSelf()); - } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationProxy.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationProxy.java index 89cc969525..83737cfac5 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationProxy.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationProxy.java @@ -8,7 +8,9 @@ package org.opendaylight.controller.cluster.datastore; +import akka.actor.ActorRef; import akka.actor.ActorSelection; +import akka.actor.PoisonPill; import org.opendaylight.controller.cluster.datastore.messages.CloseDataChangeListenerRegistration; import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeListener; import org.opendaylight.yangtools.concepts.ListenerRegistration; @@ -25,13 +27,15 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; public class DataChangeListenerRegistrationProxy implements ListenerRegistration { private final ActorSelection listenerRegistrationActor; private final AsyncDataChangeListener listener; + private final ActorRef dataChangeListenerActor; public >> DataChangeListenerRegistrationProxy( ActorSelection listenerRegistrationActor, - L listener) { + L listener, ActorRef dataChangeListenerActor) { this.listenerRegistrationActor = listenerRegistrationActor; this.listener = listener; + this.dataChangeListenerActor = dataChangeListenerActor; } @Override @@ -42,5 +46,6 @@ public class DataChangeListenerRegistrationProxy implements ListenerRegistration @Override public void close() { listenerRegistrationActor.tell(new CloseDataChangeListenerRegistration(), null); + dataChangeListenerActor.tell(PoisonPill.getInstance(), null); } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java index 4964b92ab7..4401104a85 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java @@ -29,10 +29,13 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContextListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + /** * */ -public class DistributedDataStore implements DOMStore, SchemaContextListener { +public class DistributedDataStore implements DOMStore, SchemaContextListener, AutoCloseable { private static final Logger LOG = LoggerFactory.getLogger(DistributedDataStore.class); @@ -41,8 +44,20 @@ public class DistributedDataStore implements DOMStore, SchemaContextListener { private final String type; private final ActorContext actorContext; + + /** + * Executor used to run FutureTask's + * + * This is typically used when we need to make a request to an actor and + * wait for it's response and the consumer needs to be provided a Future. + * + * FIXME : Make the thread pool configurable + */ + private final ExecutorService executor = + Executors.newFixedThreadPool(10); + public DistributedDataStore(ActorSystem actorSystem, String type) { - this(new ActorContext(actorSystem, actorSystem.actorOf(ShardManager.props(type))), type); + this(new ActorContext(actorSystem, actorSystem.actorOf(ShardManager.props(type), "shardmanager-" + type)), type); } public DistributedDataStore(ActorContext actorContext, String type) { @@ -57,7 +72,7 @@ public class DistributedDataStore implements DOMStore, SchemaContextListener { AsyncDataBroker.DataChangeScope scope) { ActorRef dataChangeListenerActor = actorContext.getActorSystem().actorOf( - DataChangeListener.props()); + DataChangeListener.props(listener)); Object result = actorContext.executeShardOperation(Shard.DEFAULT_NAME, new RegisterChangeListener(path, dataChangeListenerActor.path(), @@ -66,33 +81,41 @@ public class DistributedDataStore implements DOMStore, SchemaContextListener { ); RegisterChangeListenerReply reply = (RegisterChangeListenerReply) result; - return new DataChangeListenerRegistrationProxy(actorContext.actorSelection(reply.getListenerRegistrationPath()), listener); + return new DataChangeListenerRegistrationProxy(actorContext.actorSelection(reply.getListenerRegistrationPath()), listener, dataChangeListenerActor); } @Override public DOMStoreTransactionChain createTransactionChain() { - return new TransactionChainProxy(actorContext); + return new TransactionChainProxy(actorContext, executor); } @Override public DOMStoreReadTransaction newReadOnlyTransaction() { - return new TransactionProxy(actorContext, TransactionProxy.TransactionType.READ_ONLY); + return new TransactionProxy(actorContext, TransactionProxy.TransactionType.READ_ONLY, + executor); } @Override public DOMStoreWriteTransaction newWriteOnlyTransaction() { - return new TransactionProxy(actorContext, TransactionProxy.TransactionType.WRITE_ONLY); + return new TransactionProxy(actorContext, TransactionProxy.TransactionType.WRITE_ONLY, + executor); } @Override public DOMStoreReadWriteTransaction newReadWriteTransaction() { - return new TransactionProxy(actorContext, TransactionProxy.TransactionType.READ_WRITE); + return new TransactionProxy(actorContext, TransactionProxy.TransactionType.READ_WRITE, + executor); } @Override public void onGlobalContextUpdated(SchemaContext schemaContext) { actorContext.getShardManager().tell( new UpdateSchemaContext(schemaContext), null); } + + @Override public void close() throws Exception { + actorContext.shutdown(); + + } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreFactory.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreFactory.java new file mode 100644 index 0000000000..f19cb9284c --- /dev/null +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreFactory.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.controller.cluster.datastore; + +import org.opendaylight.controller.sal.core.api.model.SchemaService; + +public class DistributedDataStoreFactory { + public static DistributedDataStore createInstance(String name, SchemaService schemaService){ + final DistributedDataStore dataStore = + new DistributedDataStore(ActorSystemFactory.getInstance(), name); + schemaService + .registerSchemaServiceListener(dataStore); + return dataStore; + + } +} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java index b4ad089027..3425608d23 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java @@ -20,15 +20,19 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; import org.opendaylight.controller.cluster.datastore.messages.CommitTransactionReply; +import org.opendaylight.controller.cluster.datastore.messages.CreateTransaction; import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionChain; import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionChainReply; +import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionReply; import org.opendaylight.controller.cluster.datastore.messages.ForwardedCommitTransaction; +import org.opendaylight.controller.cluster.datastore.messages.NonPersistent; import org.opendaylight.controller.cluster.datastore.messages.RegisterChangeListener; import org.opendaylight.controller.cluster.datastore.messages.RegisterChangeListenerReply; import org.opendaylight.controller.cluster.datastore.messages.UpdateSchemaContext; import org.opendaylight.controller.cluster.datastore.modification.Modification; import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeListener; import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore; +import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadWriteTransaction; import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort; import org.opendaylight.controller.sal.core.spi.data.DOMStoreTransactionChain; import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; @@ -60,7 +64,17 @@ public class Shard extends UntypedProcessor { private final LoggingAdapter log = Logging.getLogger(getContext().system(), this); + // By default persistent will be true and can be turned off using the system + // property persistent + private final boolean persistent; + private Shard(String name) { + + String setting = System.getProperty("shard.persistent"); + this.persistent = !"false".equals(setting); + + log.info("Creating shard : {} persistent : {}", name , persistent); + store = new InMemoryDOMDataStore(name, storeExecutor); } @@ -75,8 +89,11 @@ public class Shard extends UntypedProcessor { }); } + @Override public void onReceive(Object message) throws Exception { + log.debug("Received message {}", message); + if (message instanceof CreateTransactionChain) { createTransactionChain(); } else if (message instanceof RegisterChangeListener) { @@ -86,12 +103,25 @@ public class Shard extends UntypedProcessor { } else if (message instanceof ForwardedCommitTransaction) { handleForwardedCommit((ForwardedCommitTransaction) message); } else if (message instanceof Persistent) { - commit((Persistent) message); + commit((Modification) ((Persistent) message).payload()); + } else if (message instanceof CreateTransaction) { + createTransaction((CreateTransaction) message); + } else if(message instanceof NonPersistent){ + commit((Modification) ((NonPersistent) message).payload()); } } - private void commit(Persistent message) { - Modification modification = (Modification) message.payload(); + private void createTransaction(CreateTransaction createTransaction) { + DOMStoreReadWriteTransaction transaction = + store.newReadWriteTransaction(); + ActorRef transactionActor = getContext().actorOf( + ShardTransaction.props(transaction, getSelf()), "shard-" + createTransaction.getTransactionId()); + getSender() + .tell(new CreateTransactionReply(transactionActor.path(), createTransaction.getTransactionId()), + getSelf()); + } + + private void commit(Modification modification) { DOMStoreThreePhaseCommitCohort cohort = modificationToCohort.remove(modification); if (cohort == null) { @@ -109,6 +139,7 @@ public class Shard extends UntypedProcessor { future.get(); sender.tell(new CommitTransactionReply(), self); } catch (InterruptedException | ExecutionException e) { + // FIXME : Handle this properly log.error(e, "An exception happened when committing"); } } @@ -116,11 +147,15 @@ public class Shard extends UntypedProcessor { } private void handleForwardedCommit(ForwardedCommitTransaction message) { - log.info("received forwarded transaction"); modificationToCohort .put(message.getModification(), message.getCohort()); - getSelf().forward(Persistent.create(message.getModification()), - getContext()); + if(persistent) { + getSelf().forward(Persistent.create(message.getModification()), + getContext()); + } else { + getSelf().forward(NonPersistent.create(message.getModification()), + getContext()); + } } private void updateSchemaContext(UpdateSchemaContext message) { diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardManager.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardManager.java index 4e2369d375..250ef49e6f 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardManager.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardManager.java @@ -12,7 +12,6 @@ import akka.actor.ActorPath; import akka.actor.ActorRef; import akka.actor.Address; import akka.actor.Props; -import akka.actor.UntypedActor; import akka.event.Logging; import akka.event.LoggingAdapter; import akka.japi.Creator; @@ -48,7 +47,7 @@ import java.util.Map; *
  • When a local shard replica comes alive *

    */ -public class ShardManager extends UntypedActor { +public class ShardManager extends AbstractUntypedActor { // Stores a mapping between a shard name and the address of the current primary private final Map shardNameToPrimaryAddress = new HashMap<>(); @@ -69,7 +68,7 @@ public class ShardManager extends UntypedActor { * configuration or operational */ private ShardManager(String type){ - ActorRef actor = getContext().actorOf(Shard.props(Shard.DEFAULT_NAME + "-" + type)); + ActorRef actor = getContext().actorOf(Shard.props("shard-" + Shard.DEFAULT_NAME + "-" + type), "shard-" + Shard.DEFAULT_NAME + "-" + type); defaultShardPath = actor.path(); } @@ -84,7 +83,7 @@ public class ShardManager extends UntypedActor { } @Override - public void onReceive(Object message) throws Exception { + public void handleReceive(Object message) throws Exception { if (message instanceof FindPrimary) { FindPrimary msg = ((FindPrimary) message); String shardName = msg.getShardName(); diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardTransaction.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardTransaction.java index 75744cad5b..e3d1e2d9d4 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardTransaction.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardTransaction.java @@ -9,8 +9,8 @@ package org.opendaylight.controller.cluster.datastore; import akka.actor.ActorRef; +import akka.actor.PoisonPill; import akka.actor.Props; -import akka.actor.UntypedActor; import akka.event.Logging; import akka.event.LoggingAdapter; import akka.japi.Creator; @@ -36,6 +36,7 @@ import org.opendaylight.controller.cluster.datastore.modification.MutableComposi import org.opendaylight.controller.cluster.datastore.modification.WriteModification; import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadWriteTransaction; import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort; +import org.opendaylight.controller.sal.core.spi.data.DOMStoreTransactionChain; import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; @@ -43,16 +44,16 @@ import java.util.concurrent.ExecutionException; /** * The ShardTransaction Actor represents a remote transaction - *

    + *

    * The ShardTransaction Actor delegates all actions to DOMDataReadWriteTransaction - *

    - *

    + *

    + *

    * Even though the DOMStore and the DOMStoreTransactionChain implement multiple types of transactions * the ShardTransaction Actor only works with read-write transactions. This is just to keep the logic simple. At this * time there are no known advantages for creating a read-only or write-only transaction which may change over time * at which point we can optimize things in the distributed store as well. - *

    - *

    + *

    + *

    * Handles Messages
    * ----------------
    *

  • {@link org.opendaylight.controller.cluster.datastore.messages.ReadData} @@ -63,125 +64,164 @@ import java.util.concurrent.ExecutionException; *
  • {@link org.opendaylight.controller.cluster.datastore.messages.CloseTransaction} *

    */ -public class ShardTransaction extends UntypedActor { - - private final ActorRef shardActor; - - private final DOMStoreReadWriteTransaction transaction; - - private final MutableCompositeModification modification = new MutableCompositeModification(); - - private final LoggingAdapter log = Logging.getLogger(getContext().system(), this); - - public ShardTransaction(DOMStoreReadWriteTransaction transaction, ActorRef shardActor) { - this.transaction = transaction; - this.shardActor = shardActor; - } - - - public static Props props(final DOMStoreReadWriteTransaction transaction, final ActorRef shardActor){ - return Props.create(new Creator(){ - - @Override - public ShardTransaction create() throws Exception { - return new ShardTransaction(transaction, shardActor); - } - }); - } - - @Override - public void onReceive(Object message) throws Exception { - if(message instanceof ReadData){ - readData((ReadData) message); - } else if(message instanceof WriteData){ - writeData((WriteData) message); - } else if(message instanceof MergeData){ - mergeData((MergeData) message); - } else if(message instanceof DeleteData){ - deleteData((DeleteData) message); - } else if(message instanceof ReadyTransaction){ - readyTransaction((ReadyTransaction) message); - } else if(message instanceof CloseTransaction){ - closeTransaction((CloseTransaction) message); - } else if(message instanceof GetCompositedModification){ - // This is here for testing only - getSender().tell(new GetCompositeModificationReply(new ImmutableCompositeModification(modification)), getSelf()); +public class ShardTransaction extends AbstractUntypedActor { + + private final ActorRef shardActor; + + // FIXME : see below + // If transactionChain is not null then this transaction is part of a + // transactionChain. Not really clear as to what that buys us + private final DOMStoreTransactionChain transactionChain; + + private final DOMStoreReadWriteTransaction transaction; + + private final MutableCompositeModification modification = + new MutableCompositeModification(); + + private final LoggingAdapter log = + Logging.getLogger(getContext().system(), this); + + public ShardTransaction(DOMStoreReadWriteTransaction transaction, + ActorRef shardActor) { + this(null, transaction, shardActor); } - } - - private void readData(ReadData message) { - final ActorRef sender = getSender(); - final ActorRef self = getSelf(); - final InstanceIdentifier path = message.getPath(); - final ListenableFuture>> future = transaction.read(path); - - future.addListener(new Runnable() { - @Override - public void run() { - try { - Optional> optional = future.get(); - if(optional.isPresent()){ - sender.tell(new ReadDataReply(optional.get()), self); - } else { - //TODO : Need to decide what to do here - } - } catch (InterruptedException | ExecutionException e) { - log.error(e, "An exception happened when reading data from path : " + path.toString()); - } - } - }, getContext().dispatcher()); - } + public ShardTransaction(DOMStoreTransactionChain transactionChain, DOMStoreReadWriteTransaction transaction, + ActorRef shardActor) { + this.transactionChain = transactionChain; + this.transaction = transaction; + this.shardActor = shardActor; + } - private void writeData(WriteData message){ - modification.addModification(new WriteModification(message.getPath(), message.getData())); - transaction.write(message.getPath(), message.getData()); - getSender().tell(new WriteDataReply(), getSelf()); - } - private void mergeData(MergeData message){ - modification.addModification(new MergeModification(message.getPath(), message.getData())); - transaction.merge(message.getPath(), message.getData()); - getSender().tell(new MergeDataReply(), getSelf()); - } + public static Props props(final DOMStoreReadWriteTransaction transaction, + final ActorRef shardActor) { + return Props.create(new Creator() { - private void deleteData(DeleteData message){ - modification.addModification(new DeleteModification(message.getPath())); - transaction.delete(message.getPath()); - getSender().tell(new DeleteDataReply(), getSelf()); - } + @Override + public ShardTransaction create() throws Exception { + return new ShardTransaction(transaction, shardActor); + } + }); + } - private void readyTransaction(ReadyTransaction message){ - DOMStoreThreePhaseCommitCohort cohort = transaction.ready(); - ActorRef cohortActor = getContext().actorOf(ThreePhaseCommitCohort.props(cohort, shardActor, modification)); - getSender().tell(new ReadyTransactionReply(cohortActor.path()), getSelf()); + public static Props props(final DOMStoreTransactionChain transactionChain, final DOMStoreReadWriteTransaction transaction, + final ActorRef shardActor) { + return Props.create(new Creator() { - } + @Override + public ShardTransaction create() throws Exception { + return new ShardTransaction(transactionChain, transaction, shardActor); + } + }); + } - private void closeTransaction(CloseTransaction message){ - transaction.close(); - getSender().tell(new CloseTransactionReply(), getSelf()); - } + @Override + public void handleReceive(Object message) throws Exception { + if (message instanceof ReadData) { + readData((ReadData) message); + } else if (message instanceof WriteData) { + writeData((WriteData) message); + } else if (message instanceof MergeData) { + mergeData((MergeData) message); + } else if (message instanceof DeleteData) { + deleteData((DeleteData) message); + } else if (message instanceof ReadyTransaction) { + readyTransaction((ReadyTransaction) message); + } else if (message instanceof CloseTransaction) { + closeTransaction((CloseTransaction) message); + } else if (message instanceof GetCompositedModification) { + // This is here for testing only + getSender().tell(new GetCompositeModificationReply( + new ImmutableCompositeModification(modification)), getSelf()); + } + } - // These classes are in here for test purposes only + private void readData(ReadData message) { + final ActorRef sender = getSender(); + final ActorRef self = getSelf(); + final InstanceIdentifier path = message.getPath(); + final ListenableFuture>> future = + transaction.read(path); + + future.addListener(new Runnable() { + @Override + public void run() { + try { + Optional> optional = future.get(); + if (optional.isPresent()) { + sender.tell(new ReadDataReply(optional.get()), self); + } else { + sender.tell(new ReadDataReply(null), self); + } + } catch (InterruptedException | ExecutionException e) { + log.error(e, + "An exception happened when reading data from path : " + + path.toString()); + } + + } + }, getContext().dispatcher()); + } - static class GetCompositedModification { - } + private void writeData(WriteData message) { + modification.addModification( + new WriteModification(message.getPath(), message.getData())); + transaction.write(message.getPath(), message.getData()); + getSender().tell(new WriteDataReply(), getSelf()); + } - static class GetCompositeModificationReply { - private final CompositeModification modification; + private void mergeData(MergeData message) { + modification.addModification( + new MergeModification(message.getPath(), message.getData())); + transaction.merge(message.getPath(), message.getData()); + getSender().tell(new MergeDataReply(), getSelf()); + } + private void deleteData(DeleteData message) { + modification.addModification(new DeleteModification(message.getPath())); + transaction.delete(message.getPath()); + getSender().tell(new DeleteDataReply(), getSelf()); + } + + private void readyTransaction(ReadyTransaction message) { + DOMStoreThreePhaseCommitCohort cohort = transaction.ready(); + ActorRef cohortActor = getContext().actorOf( + ThreePhaseCommitCohort.props(cohort, shardActor, modification), "cohort"); + getSender() + .tell(new ReadyTransactionReply(cohortActor.path()), getSelf()); + + } + + private void closeTransaction(CloseTransaction message) { + transaction.close(); + getSender().tell(new CloseTransactionReply(), getSelf()); + getSelf().tell(PoisonPill.getInstance(), getSelf()); + } + + + // These classes are in here for test purposes only + + + static class GetCompositedModification { - GetCompositeModificationReply(CompositeModification modification) { - this.modification = modification; } - public CompositeModification getModification() { - return modification; + static class GetCompositeModificationReply { + private final CompositeModification modification; + + + GetCompositeModificationReply(CompositeModification modification) { + this.modification = modification; + } + + + public CompositeModification getModification() { + return modification; + } } - } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardTransactionChain.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardTransactionChain.java index 79aaa86b28..1092e9a793 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardTransactionChain.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardTransactionChain.java @@ -10,7 +10,6 @@ package org.opendaylight.controller.cluster.datastore; import akka.actor.ActorRef; import akka.actor.Props; -import akka.actor.UntypedActor; import akka.japi.Creator; import org.opendaylight.controller.cluster.datastore.messages.CloseTransactionChain; import org.opendaylight.controller.cluster.datastore.messages.CloseTransactionChainReply; @@ -22,33 +21,42 @@ import org.opendaylight.controller.sal.core.spi.data.DOMStoreTransactionChain; /** * The ShardTransactionChain Actor represents a remote TransactionChain */ -public class ShardTransactionChain extends UntypedActor{ - - private final DOMStoreTransactionChain chain; - - public ShardTransactionChain(DOMStoreTransactionChain chain) { - this.chain = chain; - } - - @Override - public void onReceive(Object message) throws Exception { - if(message instanceof CreateTransaction){ - DOMStoreReadWriteTransaction transaction = chain.newReadWriteTransaction(); - ActorRef transactionActor = getContext().actorOf(ShardTransaction.props(transaction, getContext().parent())); - getSender().tell(new CreateTransactionReply(transactionActor.path()), getSelf()); - } else if (message instanceof CloseTransactionChain){ - chain.close(); - getSender().tell(new CloseTransactionChainReply(), getSelf()); +public class ShardTransactionChain extends AbstractUntypedActor { + + private final DOMStoreTransactionChain chain; + + public ShardTransactionChain(DOMStoreTransactionChain chain) { + this.chain = chain; } - } - public static Props props(final DOMStoreTransactionChain chain){ - return Props.create(new Creator(){ + @Override + public void handleReceive(Object message) throws Exception { + if (message instanceof CreateTransaction) { + CreateTransaction createTransaction = (CreateTransaction) message; + createTransaction(createTransaction); + } else if (message instanceof CloseTransactionChain) { + chain.close(); + getSender().tell(new CloseTransactionChainReply(), getSelf()); + } + } - @Override - public ShardTransactionChain create() throws Exception { - return new ShardTransactionChain(chain); - } - }); - } + private void createTransaction(CreateTransaction createTransaction) { + DOMStoreReadWriteTransaction transaction = + chain.newReadWriteTransaction(); + ActorRef transactionActor = getContext().actorOf(ShardTransaction + .props(chain, transaction, getContext().parent()), "shard-" + createTransaction.getTransactionId()); + getSender() + .tell(new CreateTransactionReply(transactionActor.path(), createTransaction.getTransactionId()), + getSelf()); + } + + public static Props props(final DOMStoreTransactionChain chain) { + return Props.create(new Creator() { + + @Override + public ShardTransactionChain create() throws Exception { + return new ShardTransactionChain(chain); + } + }); + } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TerminationMonitor.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TerminationMonitor.java new file mode 100644 index 0000000000..e6ac7f8dbc --- /dev/null +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TerminationMonitor.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.controller.cluster.datastore; + +import akka.actor.Terminated; +import akka.actor.UntypedActor; +import akka.event.Logging; +import akka.event.LoggingAdapter; +import org.opendaylight.controller.cluster.datastore.messages.Monitor; + +public class TerminationMonitor extends UntypedActor{ + protected final LoggingAdapter LOG = + Logging.getLogger(getContext().system(), this); + + public TerminationMonitor(){ + LOG.info("Created TerminationMonitor"); + } + + @Override public void onReceive(Object message) throws Exception { + if(message instanceof Terminated){ + Terminated terminated = (Terminated) message; + LOG.debug("Actor terminated : {}", terminated.actor()); + } else if(message instanceof Monitor){ + Monitor monitor = (Monitor) message; + getContext().watch(monitor.getActorRef()); + } + } +} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohort.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohort.java index 61baf1ab64..060c9d6b50 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohort.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohort.java @@ -9,8 +9,8 @@ package org.opendaylight.controller.cluster.datastore; import akka.actor.ActorRef; +import akka.actor.PoisonPill; import akka.actor.Props; -import akka.actor.UntypedActor; import akka.event.Logging; import akka.event.LoggingAdapter; import akka.japi.Creator; @@ -28,101 +28,110 @@ import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCoh import java.util.concurrent.ExecutionException; -public class ThreePhaseCommitCohort extends UntypedActor{ - private final DOMStoreThreePhaseCommitCohort cohort; - private final ActorRef shardActor; - private final CompositeModification modification; - - public ThreePhaseCommitCohort(DOMStoreThreePhaseCommitCohort cohort, ActorRef shardActor, CompositeModification modification) { - this.cohort = cohort; - this.shardActor = shardActor; - this.modification = modification; - } - - private final LoggingAdapter log = Logging.getLogger(getContext().system(), this); - - public static Props props(final DOMStoreThreePhaseCommitCohort cohort, final ActorRef shardActor, final CompositeModification modification) { - return Props.create(new Creator(){ - @Override - public ThreePhaseCommitCohort create() throws Exception { - return new ThreePhaseCommitCohort(cohort, shardActor, modification); - } - }); - } - - @Override - public void onReceive(Object message) throws Exception { - if(message instanceof CanCommitTransaction){ - canCommit((CanCommitTransaction) message); - } else if(message instanceof PreCommitTransaction) { - preCommit((PreCommitTransaction) message); - } else if(message instanceof CommitTransaction){ - commit((CommitTransaction) message); - } else if (message instanceof AbortTransaction){ - abort((AbortTransaction) message); +public class ThreePhaseCommitCohort extends AbstractUntypedActor { + private final DOMStoreThreePhaseCommitCohort cohort; + private final ActorRef shardActor; + private final CompositeModification modification; + + public ThreePhaseCommitCohort(DOMStoreThreePhaseCommitCohort cohort, + ActorRef shardActor, CompositeModification modification) { + + this.cohort = cohort; + this.shardActor = shardActor; + this.modification = modification; } - } - - private void abort(AbortTransaction message) { - final ListenableFuture future = cohort.abort(); - final ActorRef sender = getSender(); - final ActorRef self = getSelf(); - - future.addListener(new Runnable() { - @Override - public void run() { - try { - future.get(); - sender.tell(new AbortTransactionReply(), self); - } catch (InterruptedException | ExecutionException e) { - log.error(e, "An exception happened when aborting"); - } - } - }, getContext().dispatcher()); - } - - private void commit(CommitTransaction message) { - // Forward the commit to the shard - log.info("Commit transaction now + " + shardActor); - shardActor.forward(new ForwardedCommitTransaction(cohort, modification), getContext()); - - } - - private void preCommit(PreCommitTransaction message) { - final ListenableFuture future = cohort.preCommit(); - final ActorRef sender = getSender(); - final ActorRef self = getSelf(); - - future.addListener(new Runnable() { - @Override - public void run() { - try { - future.get(); - sender.tell(new PreCommitTransactionReply(), self); - } catch (InterruptedException | ExecutionException e) { - log.error(e, "An exception happened when preCommitting"); - } - } - }, getContext().dispatcher()); - - } - - private void canCommit(CanCommitTransaction message) { - final ListenableFuture future = cohort.canCommit(); - final ActorRef sender = getSender(); - final ActorRef self = getSelf(); - - future.addListener(new Runnable() { - @Override - public void run() { - try { - Boolean canCommit = future.get(); - sender.tell(new CanCommitTransactionReply(canCommit), self); - } catch (InterruptedException | ExecutionException e) { - log.error(e, "An exception happened when aborting"); + + private final LoggingAdapter log = + Logging.getLogger(getContext().system(), this); + + public static Props props(final DOMStoreThreePhaseCommitCohort cohort, + final ActorRef shardActor, final CompositeModification modification) { + return Props.create(new Creator() { + @Override + public ThreePhaseCommitCohort create() throws Exception { + return new ThreePhaseCommitCohort(cohort, shardActor, + modification); + } + }); + } + + + @Override + public void handleReceive(Object message) throws Exception { + if (message instanceof CanCommitTransaction) { + canCommit((CanCommitTransaction) message); + } else if (message instanceof PreCommitTransaction) { + preCommit((PreCommitTransaction) message); + } else if (message instanceof CommitTransaction) { + commit((CommitTransaction) message); + } else if (message instanceof AbortTransaction) { + abort((AbortTransaction) message); } - } - }, getContext().dispatcher()); + } + + private void abort(AbortTransaction message) { + final ListenableFuture future = cohort.abort(); + final ActorRef sender = getSender(); + final ActorRef self = getSelf(); + + future.addListener(new Runnable() { + @Override + public void run() { + try { + future.get(); + sender.tell(new AbortTransactionReply(), self); + } catch (InterruptedException | ExecutionException e) { + log.error(e, "An exception happened when aborting"); + } + } + }, getContext().dispatcher()); + } + + private void commit(CommitTransaction message) { + // Forward the commit to the shard + log.debug("Forward commit transaction to Shard {} ", shardActor); + shardActor.forward(new ForwardedCommitTransaction(cohort, modification), + getContext()); + + getContext().parent().tell(PoisonPill.getInstance(), getSelf()); + + } - } + private void preCommit(PreCommitTransaction message) { + final ListenableFuture future = cohort.preCommit(); + final ActorRef sender = getSender(); + final ActorRef self = getSelf(); + + future.addListener(new Runnable() { + @Override + public void run() { + try { + future.get(); + sender.tell(new PreCommitTransactionReply(), self); + } catch (InterruptedException | ExecutionException e) { + log.error(e, "An exception happened when preCommitting"); + } + } + }, getContext().dispatcher()); + + } + + private void canCommit(CanCommitTransaction message) { + final ListenableFuture future = cohort.canCommit(); + final ActorRef sender = getSender(); + final ActorRef self = getSelf(); + + future.addListener(new Runnable() { + @Override + public void run() { + try { + Boolean canCommit = future.get(); + sender.tell(new CanCommitTransactionReply(canCommit), self); + } catch (InterruptedException | ExecutionException e) { + log.error(e, "An exception happened when aborting"); + } + } + }, getContext().dispatcher()); + + } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java index 197b3b70ce..279ecba409 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java @@ -9,11 +9,27 @@ package org.opendaylight.controller.cluster.datastore; import akka.actor.ActorPath; +import akka.actor.ActorSelection; import com.google.common.util.concurrent.ListenableFuture; +import com.google.common.util.concurrent.ListenableFutureTask; +import org.opendaylight.controller.cluster.datastore.exceptions.TimeoutException; +import org.opendaylight.controller.cluster.datastore.messages.AbortTransaction; +import org.opendaylight.controller.cluster.datastore.messages.AbortTransactionReply; +import org.opendaylight.controller.cluster.datastore.messages.CanCommitTransaction; +import org.opendaylight.controller.cluster.datastore.messages.CanCommitTransactionReply; +import org.opendaylight.controller.cluster.datastore.messages.CommitTransaction; +import org.opendaylight.controller.cluster.datastore.messages.CommitTransactionReply; +import org.opendaylight.controller.cluster.datastore.messages.PreCommitTransaction; +import org.opendaylight.controller.cluster.datastore.messages.PreCommitTransactionReply; +import org.opendaylight.controller.cluster.datastore.utils.ActorContext; import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.util.Collections; import java.util.List; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; /** * ThreePhaseCommitCohortProxy represents a set of remote cohort proxies @@ -21,27 +37,114 @@ import java.util.List; public class ThreePhaseCommitCohortProxy implements DOMStoreThreePhaseCommitCohort{ + private static final Logger + LOG = LoggerFactory.getLogger(DistributedDataStore.class); + + private final ActorContext actorContext; private final List cohortPaths; + private final ExecutorService executor; + private final String transactionId; + - public ThreePhaseCommitCohortProxy(List cohortPaths) { + public ThreePhaseCommitCohortProxy(ActorContext actorContext, + List cohortPaths, + String transactionId, + ExecutorService executor) { + this.actorContext = actorContext; this.cohortPaths = cohortPaths; + this.transactionId = transactionId; + this.executor = executor; } @Override public ListenableFuture canCommit() { - throw new UnsupportedOperationException("canCommit"); + Callable call = new Callable() { + + @Override public Boolean call() throws Exception { + for(ActorPath actorPath : cohortPaths){ + ActorSelection cohort = actorContext.actorSelection(actorPath); + + try { + Object response = + actorContext.executeRemoteOperation(cohort, + new CanCommitTransaction(), + ActorContext.ASK_DURATION); + + if (response instanceof CanCommitTransactionReply) { + CanCommitTransactionReply reply = + (CanCommitTransactionReply) response; + if (!reply.getCanCommit()) { + return false; + } + } + } catch(RuntimeException e){ + LOG.error("Unexpected Exception", e); + return false; + } + + + } + return true; + } + }; + + ListenableFutureTask + future = ListenableFutureTask.create(call); + + executor.submit(future); + + return future; } @Override public ListenableFuture preCommit() { - throw new UnsupportedOperationException("preCommit"); + return voidOperation(new PreCommitTransaction(), PreCommitTransactionReply.class); } @Override public ListenableFuture abort() { - throw new UnsupportedOperationException("abort"); + return voidOperation(new AbortTransaction(), AbortTransactionReply.class); } @Override public ListenableFuture commit() { - throw new UnsupportedOperationException("commit"); + return voidOperation(new CommitTransaction(), CommitTransactionReply.class); + } + + private ListenableFuture voidOperation(final Object message, final Class expectedResponseClass){ + Callable call = new Callable() { + + @Override public Void call() throws Exception { + for(ActorPath actorPath : cohortPaths){ + ActorSelection cohort = actorContext.actorSelection(actorPath); + + try { + Object response = + actorContext.executeRemoteOperation(cohort, + message, + ActorContext.ASK_DURATION); + + if (response != null && !response.getClass() + .equals(expectedResponseClass)) { + throw new RuntimeException( + String.format( + "did not get the expected response \n\t\t expected : %s \n\t\t actual : %s", + expectedResponseClass.toString(), + response.getClass().toString()) + ); + } + } catch(TimeoutException e){ + LOG.error(String.format("A timeout occurred when processing operation : %s", message)); + } + } + return null; + } + }; + + ListenableFutureTask + future = ListenableFutureTask.create(call); + + executor.submit(future); + + return future; + } public List getCohortPaths() { diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxy.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxy.java index 837ffc1b51..71b61ffaa0 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxy.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxy.java @@ -14,36 +14,41 @@ import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadWriteTransactio import org.opendaylight.controller.sal.core.spi.data.DOMStoreTransactionChain; import org.opendaylight.controller.sal.core.spi.data.DOMStoreWriteTransaction; +import java.util.concurrent.ExecutorService; + /** * TransactionChainProxy acts as a proxy for a DOMStoreTransactionChain created on a remote shard */ public class TransactionChainProxy implements DOMStoreTransactionChain{ private final ActorContext actorContext; + private final ExecutorService transactionExecutor; - public TransactionChainProxy(ActorContext actorContext) { + public TransactionChainProxy(ActorContext actorContext, ExecutorService transactionExecutor) { this.actorContext = actorContext; + this.transactionExecutor = transactionExecutor; } @Override public DOMStoreReadTransaction newReadOnlyTransaction() { return new TransactionProxy(actorContext, - TransactionProxy.TransactionType.READ_ONLY); + TransactionProxy.TransactionType.READ_ONLY, transactionExecutor); } @Override public DOMStoreReadWriteTransaction newReadWriteTransaction() { return new TransactionProxy(actorContext, - TransactionProxy.TransactionType.WRITE_ONLY); + TransactionProxy.TransactionType.WRITE_ONLY, transactionExecutor); } @Override public DOMStoreWriteTransaction newWriteOnlyTransaction() { return new TransactionProxy(actorContext, - TransactionProxy.TransactionType.READ_WRITE); + TransactionProxy.TransactionType.READ_WRITE, transactionExecutor); } @Override public void close() { + // FIXME : The problem here is don't know which shard the transaction chain is to be created on ??? throw new UnsupportedOperationException("close - not sure what to do here?"); } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java index 32bb7d0951..74245c4259 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java @@ -34,7 +34,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.Callable; -import java.util.concurrent.Executors; +import java.util.concurrent.ExecutorService; import java.util.concurrent.atomic.AtomicLong; /** @@ -50,7 +50,6 @@ import java.util.concurrent.atomic.AtomicLong; *

    */ public class TransactionProxy implements DOMStoreReadWriteTransaction { - public enum TransactionType { READ_ONLY, WRITE_ONLY, @@ -59,20 +58,24 @@ public class TransactionProxy implements DOMStoreReadWriteTransaction { private static final AtomicLong counter = new AtomicLong(); - private final TransactionType readOnly; + private final TransactionType transactionType; private final ActorContext actorContext; private final Map remoteTransactionPaths = new HashMap<>(); private final String identifier; + private final ExecutorService executor; public TransactionProxy( ActorContext actorContext, - TransactionType readOnly) { + TransactionType transactionType, + ExecutorService executor + ) { - this.identifier = "transaction-" + counter.getAndIncrement(); - this.readOnly = readOnly; + this.identifier = "txn-" + counter.getAndIncrement(); + this.transactionType = transactionType; this.actorContext = actorContext; + this.executor = executor; - Object response = actorContext.executeShardOperation(Shard.DEFAULT_NAME, new CreateTransaction(), ActorContext.ASK_DURATION); + Object response = actorContext.executeShardOperation(Shard.DEFAULT_NAME, new CreateTransaction(identifier), ActorContext.ASK_DURATION); if(response instanceof CreateTransactionReply){ CreateTransactionReply reply = (CreateTransactionReply) response; remoteTransactionPaths.put(Shard.DEFAULT_NAME, actorContext.actorSelection(reply.getTransactionPath())); @@ -91,6 +94,9 @@ public class TransactionProxy implements DOMStoreReadWriteTransaction { ActorContext.ASK_DURATION); if(response instanceof ReadDataReply){ ReadDataReply reply = (ReadDataReply) response; + if(reply.getNormalizedNode() == null){ + return Optional.absent(); + } //FIXME : A cast should not be required here ??? return (Optional>) Optional.of(reply.getNormalizedNode()); } @@ -102,8 +108,7 @@ public class TransactionProxy implements DOMStoreReadWriteTransaction { ListenableFutureTask>> future = ListenableFutureTask.create(call); - //FIXME : Use a thread pool here - Executors.newSingleThreadExecutor().submit(future); + executor.submit(future); return future; } @@ -142,7 +147,7 @@ public class TransactionProxy implements DOMStoreReadWriteTransaction { } } - return new ThreePhaseCommitCohortProxy(cohortPaths); + return new ThreePhaseCommitCohortProxy(actorContext, cohortPaths, identifier, executor); } @Override diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/exceptions/PrimaryNotFoundException.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/exceptions/PrimaryNotFoundException.java new file mode 100644 index 0000000000..5a131ade33 --- /dev/null +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/exceptions/PrimaryNotFoundException.java @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.controller.cluster.datastore.exceptions; + +public class PrimaryNotFoundException extends RuntimeException { +} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/exceptions/TimeoutException.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/exceptions/TimeoutException.java new file mode 100644 index 0000000000..4780aaccfb --- /dev/null +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/exceptions/TimeoutException.java @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.controller.cluster.datastore.exceptions; + +public class TimeoutException extends RuntimeException { + public TimeoutException(Exception e){ + super(e); + } +} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransaction.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransaction.java index e0cdd3cc2b..6110641696 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransaction.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransaction.java @@ -9,5 +9,14 @@ package org.opendaylight.controller.cluster.datastore.messages; public class CreateTransaction { + private final String transactionId; + public CreateTransaction(String transactionId){ + + this.transactionId = transactionId; + } + + public String getTransactionId() { + return transactionId; + } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionReply.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionReply.java index 4faf9d370d..46b7194c84 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionReply.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionReply.java @@ -11,13 +11,20 @@ package org.opendaylight.controller.cluster.datastore.messages; import akka.actor.ActorPath; public class CreateTransactionReply { - private final ActorPath transactionPath; + private final ActorPath transactionPath; + private final String transactionId; - public CreateTransactionReply(ActorPath transactionPath) { - this.transactionPath = transactionPath; - } + public CreateTransactionReply(ActorPath transactionPath, + String transactionId) { + this.transactionPath = transactionPath; + this.transactionId = transactionId; + } - public ActorPath getTransactionPath() { - return transactionPath; - } + public ActorPath getTransactionPath() { + return transactionPath; + } + + public String getTransactionId() { + return transactionId; + } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/DataChangedReply.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/DataChangedReply.java new file mode 100644 index 0000000000..3531021b94 --- /dev/null +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/DataChangedReply.java @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.controller.cluster.datastore.messages; + +public class DataChangedReply { +} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/Monitor.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/Monitor.java new file mode 100644 index 0000000000..567f14aa6a --- /dev/null +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/Monitor.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.controller.cluster.datastore.messages; + +import akka.actor.ActorRef; + +public class Monitor { + private final ActorRef actorRef; + + public Monitor(ActorRef actorRef){ + + this.actorRef = actorRef; + } + + public ActorRef getActorRef() { + return actorRef; + } +} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/NonPersistent.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/NonPersistent.java new file mode 100644 index 0000000000..a779ed0854 --- /dev/null +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/NonPersistent.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.controller.cluster.datastore.messages; + +/** + * A NonPersistent message is to be used when we want to trigger state update + * for an actor without actually persisting the data to disk. This could be + * useful for test purposes. + */ +public class NonPersistent { + private final Object payload; + + public NonPersistent(Object payload){ + this.payload = payload; + } + + public Object payload() { + return payload; + } + + public static NonPersistent create(Object payload){ + return new NonPersistent(payload); + } +} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/ActorContext.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/ActorContext.java index ba4d4de6bf..c97e07db6d 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/ActorContext.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/ActorContext.java @@ -12,7 +12,10 @@ import akka.actor.ActorPath; import akka.actor.ActorRef; import akka.actor.ActorSelection; import akka.actor.ActorSystem; +import akka.actor.PoisonPill; import akka.util.Timeout; +import org.opendaylight.controller.cluster.datastore.exceptions.PrimaryNotFoundException; +import org.opendaylight.controller.cluster.datastore.exceptions.TimeoutException; import org.opendaylight.controller.cluster.datastore.messages.FindPrimary; import org.opendaylight.controller.cluster.datastore.messages.PrimaryFound; import org.slf4j.Logger; @@ -81,7 +84,7 @@ public class ActorContext { return actorSystem.actorSelection(found.getPrimaryPath()); } - throw new RuntimeException("primary was not found"); + throw new PrimaryNotFoundException(); } /** @@ -99,7 +102,7 @@ public class ActorContext { try { return Await.result(future, AWAIT_DURATION); } catch (Exception e) { - throw new RuntimeException(e); + throw new TimeoutException(e); } } @@ -118,7 +121,7 @@ public class ActorContext { try { return Await.result(future, AWAIT_DURATION); } catch (Exception e) { - throw new RuntimeException(e); + throw new TimeoutException(e); } } @@ -131,7 +134,8 @@ public class ActorContext { * @param shardName * @param message * @param duration - * @throws java.lang.RuntimeException when a primary is not found or if the message to the remote shard fails or times out + * @throws org.opendaylight.controller.cluster.datastore.exceptions.TimeoutException if the message to the remote shard times out + * @throws org.opendaylight.controller.cluster.datastore.exceptions.PrimaryNotFoundException if the primary shard is not found * * @return */ @@ -141,4 +145,8 @@ public class ActorContext { return executeRemoteOperation(primary, message, duration); } + public void shutdown() { + shardManager.tell(PoisonPill.getInstance(), null); + actorSystem.shutdown(); + } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModule.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModule.java new file mode 100644 index 0000000000..039446baf3 --- /dev/null +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModule.java @@ -0,0 +1,32 @@ +package org.opendaylight.controller.config.yang.config.distributed_datastore_provider; + +import org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory; + +public class DistributedConfigDataStoreProviderModule extends + org.opendaylight.controller.config.yang.config.distributed_datastore_provider.AbstractDistributedConfigDataStoreProviderModule { + public DistributedConfigDataStoreProviderModule( + org.opendaylight.controller.config.api.ModuleIdentifier identifier, + org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { + super(identifier, dependencyResolver); + } + + public DistributedConfigDataStoreProviderModule( + org.opendaylight.controller.config.api.ModuleIdentifier identifier, + org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, + org.opendaylight.controller.config.yang.config.distributed_datastore_provider.DistributedConfigDataStoreProviderModule oldModule, + java.lang.AutoCloseable oldInstance) { + super(identifier, dependencyResolver, oldModule, oldInstance); + } + + @Override + public void customValidation() { + // add custom validation form module attributes here. + } + + @Override + public java.lang.AutoCloseable createInstance() { + return DistributedDataStoreFactory + .createInstance("config", getSchemaServiceDependency()); + } + +} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedDataStoreProviderModuleFactory.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModuleFactory.java similarity index 52% rename from opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedDataStoreProviderModuleFactory.java rename to opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModuleFactory.java index 53ef84ebf9..67bf599454 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedDataStoreProviderModuleFactory.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedConfigDataStoreProviderModuleFactory.java @@ -1,13 +1,13 @@ /* * Generated file * -* Generated from: yang module name: distributed-datastore-provider yang module local name: distributed-datastore-provider +* Generated from: yang module name: distributed-datastore-provider yang module local name: distributed-config-datastore-provider * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Thu Jun 12 15:23:43 PDT 2014 +* Generated at: Tue Jun 24 17:14:50 PDT 2014 * * Do not modify this file unless it is present under src/main directory */ package org.opendaylight.controller.config.yang.config.distributed_datastore_provider; -public class DistributedDataStoreProviderModuleFactory extends org.opendaylight.controller.config.yang.config.distributed_datastore_provider.AbstractDistributedDataStoreProviderModuleFactory { +public class DistributedConfigDataStoreProviderModuleFactory extends org.opendaylight.controller.config.yang.config.distributed_datastore_provider.AbstractDistributedConfigDataStoreProviderModuleFactory { } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedDataStoreProviderModule.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedDataStoreProviderModule.java deleted file mode 100644 index 3a78f93d8d..0000000000 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedDataStoreProviderModule.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.opendaylight.controller.config.yang.config.distributed_datastore_provider; - -import akka.actor.ActorSystem; -import org.opendaylight.controller.cluster.datastore.DistributedDataStore; - -public class DistributedDataStoreProviderModule extends org.opendaylight.controller.config.yang.config.distributed_datastore_provider.AbstractDistributedDataStoreProviderModule { - public DistributedDataStoreProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public DistributedDataStoreProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.controller.config.yang.config.distributed_datastore_provider.DistributedDataStoreProviderModule oldModule, java.lang.AutoCloseable oldInstance) { - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - public void customValidation() { - // add custom validation form module attributes here. - } - - @Override - public java.lang.AutoCloseable createInstance() { - ActorSystem actorSystem = ActorSystem.create("opendaylight-cluster"); - final DistributedDataStore configurationStore = new DistributedDataStore(actorSystem, "config"); - final DistributedDataStore operationalStore = new DistributedDataStore(actorSystem, "operational"); - - final class AutoCloseableDistributedDataStore implements AutoCloseable { - - @Override - public void close() throws Exception { - } - } - - return new AutoCloseableDistributedDataStore(); - } - -} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedOperationalDataStoreProviderModule.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedOperationalDataStoreProviderModule.java new file mode 100644 index 0000000000..1a06629bb7 --- /dev/null +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedOperationalDataStoreProviderModule.java @@ -0,0 +1,32 @@ +package org.opendaylight.controller.config.yang.config.distributed_datastore_provider; + +import org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory; + +public class DistributedOperationalDataStoreProviderModule extends + org.opendaylight.controller.config.yang.config.distributed_datastore_provider.AbstractDistributedOperationalDataStoreProviderModule { + public DistributedOperationalDataStoreProviderModule( + org.opendaylight.controller.config.api.ModuleIdentifier identifier, + org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { + super(identifier, dependencyResolver); + } + + public DistributedOperationalDataStoreProviderModule( + org.opendaylight.controller.config.api.ModuleIdentifier identifier, + org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, + org.opendaylight.controller.config.yang.config.distributed_datastore_provider.DistributedOperationalDataStoreProviderModule oldModule, + java.lang.AutoCloseable oldInstance) { + super(identifier, dependencyResolver, oldModule, oldInstance); + } + + @Override + public void customValidation() { + // add custom validation form module attributes here. + } + + @Override + public java.lang.AutoCloseable createInstance() { + return DistributedDataStoreFactory + .createInstance("operational", getSchemaServiceDependency()); + } + +} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedOperationalDataStoreProviderModuleFactory.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedOperationalDataStoreProviderModuleFactory.java new file mode 100644 index 0000000000..c9965fee09 --- /dev/null +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/config/yang/config/distributed_datastore_provider/DistributedOperationalDataStoreProviderModuleFactory.java @@ -0,0 +1,13 @@ +/* +* Generated file +* +* Generated from: yang module name: distributed-datastore-provider yang module local name: distributed-operational-datastore-provider +* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator +* Generated at: Tue Jun 24 17:14:50 PDT 2014 +* +* Do not modify this file unless it is present under src/main directory +*/ +package org.opendaylight.controller.config.yang.config.distributed_datastore_provider; +public class DistributedOperationalDataStoreProviderModuleFactory extends org.opendaylight.controller.config.yang.config.distributed_datastore_provider.AbstractDistributedOperationalDataStoreProviderModuleFactory { + +} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/resources/application.conf b/opendaylight/md-sal/sal-distributed-datastore/src/main/resources/application.conf new file mode 100644 index 0000000000..b56c26b578 --- /dev/null +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/resources/application.conf @@ -0,0 +1,3 @@ +ODLCluster{ + +} \ No newline at end of file diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/distributed-datastore-provider.yang b/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/distributed-datastore-provider.yang index 0471bc806e..5d3758986c 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/distributed-datastore-provider.yang +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/yang/distributed-datastore-provider.yang @@ -7,6 +7,9 @@ module distributed-datastore-provider { import config { prefix config; revision-date 2013-04-05; } import rpc-context { prefix rpcx; revision-date 2013-06-17; } + import opendaylight-config-dom-datastore {prefix config-dom-store-spi;} + import opendaylight-operational-dom-datastore {prefix operational-dom-store-spi;} + import opendaylight-md-sal-dom {prefix sal;} description "This module contains the base YANG definitions for @@ -18,17 +21,48 @@ module distributed-datastore-provider { } // This is the definition of the service implementation as a module identity. - identity distributed-datastore-provider { + identity distributed-config-datastore-provider { base config:module-type; - + config:provided-service config-dom-store-spi:config-dom-datastore; // Specifies the prefix for generated java classes. - config:java-name-prefix DistributedDataStoreProvider; + config:java-name-prefix DistributedConfigDataStoreProvider; } + // This is the definition of the service implementation as a module identity. + identity distributed-operational-datastore-provider { + base config:module-type; + config:provided-service operational-dom-store-spi:operational-dom-datastore; + // Specifies the prefix for generated java classes. + config:java-name-prefix DistributedOperationalDataStoreProvider; + } + // Augments the 'configuration' choice node under modules/module. augment "/config:modules/config:module/config:configuration" { - case distributed-datastore-provider { - when "/config:modules/config:module/config:type = 'distributed-datastore-provider'"; + case distributed-config-datastore-provider { + when "/config:modules/config:module/config:type = 'distributed-config-datastore-provider'"; + container schema-service { + uses config:service-ref { + refine type { + mandatory false; + config:required-identity sal:schema-service; + } + } + } } } + + // Augments the 'configuration' choice node under modules/module. + augment "/config:modules/config:module/config:configuration" { + case distributed-operational-datastore-provider { + when "/config:modules/config:module/config:type = 'distributed-operational-datastore-provider'"; + container schema-service { + uses config:service-ref { + refine type { + mandatory false; + config:required-identity sal:schema-service; + } + } + } + } + } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractActorTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractActorTest.java index 45ef32f7ad..214b3e9d3d 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractActorTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractActorTest.java @@ -14,21 +14,22 @@ import org.junit.AfterClass; import org.junit.BeforeClass; public abstract class AbstractActorTest { - private static ActorSystem system; + private static ActorSystem system; - @BeforeClass - public static void setUpClass(){ - system = ActorSystem.create("test"); - } + @BeforeClass + public static void setUpClass() { + System.setProperty("shard.persistent", "false"); + system = ActorSystem.create("test"); + } - @AfterClass - public static void tearDownClass(){ - JavaTestKit.shutdownActorSystem(system); - system = null; - } + @AfterClass + public static void tearDownClass() { + JavaTestKit.shutdownActorSystem(system); + system = null; + } - protected ActorSystem getSystem(){ - return system; - } + protected ActorSystem getSystem() { + return system; + } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/BasicIntegrationTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/BasicIntegrationTest.java index 8c3ec82a54..dfefc5ed57 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/BasicIntegrationTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/BasicIntegrationTest.java @@ -12,6 +12,7 @@ import akka.actor.ActorPath; import akka.actor.ActorRef; import akka.actor.ActorSelection; import akka.actor.Props; +import akka.actor.Terminated; import akka.testkit.JavaTestKit; import junit.framework.Assert; import org.junit.Test; @@ -30,11 +31,14 @@ import org.opendaylight.controller.cluster.datastore.messages.WriteData; import org.opendaylight.controller.cluster.datastore.messages.WriteDataReply; import org.opendaylight.controller.md.cluster.datastore.model.TestModel; import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; +import scala.concurrent.Await; +import scala.concurrent.Future; +import scala.concurrent.duration.FiniteDuration; public class BasicIntegrationTest extends AbstractActorTest { @Test - public void integrationTest() { + public void integrationTest() throws Exception{ // This test will // - create a Shard // - initiate a transaction @@ -57,7 +61,7 @@ public class BasicIntegrationTest extends AbstractActorTest { shard.tell(new CreateTransactionChain(), getRef()); final ActorSelection transactionChain = - new ExpectMsg("match hint") { + new ExpectMsg("CreateTransactionChainReply") { protected ActorSelection match(Object in) { if (in instanceof CreateTransactionChainReply) { ActorPath transactionChainPath = @@ -73,10 +77,10 @@ public class BasicIntegrationTest extends AbstractActorTest { Assert.assertNotNull(transactionChain); - transactionChain.tell(new CreateTransaction(), getRef()); + transactionChain.tell(new CreateTransaction("txn-1"), getRef()); final ActorSelection transaction = - new ExpectMsg("match hint") { + new ExpectMsg("CreateTransactionReply") { protected ActorSelection match(Object in) { if (in instanceof CreateTransactionReply) { ActorPath transactionPath = @@ -92,11 +96,14 @@ public class BasicIntegrationTest extends AbstractActorTest { Assert.assertNotNull(transaction); + // Add a watch on the transaction actor so that we are notified when it dies + final ActorRef transactionActorRef = watchActor(transaction); + transaction.tell(new WriteData(TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME)), getRef()); - Boolean writeDone = new ExpectMsg("match hint") { + Boolean writeDone = new ExpectMsg("WriteDataReply") { protected Boolean match(Object in) { if (in instanceof WriteDataReply) { return true; @@ -111,7 +118,7 @@ public class BasicIntegrationTest extends AbstractActorTest { transaction.tell(new ReadyTransaction(), getRef()); final ActorSelection cohort = - new ExpectMsg("match hint") { + new ExpectMsg("ReadyTransactionReply") { protected ActorSelection match(Object in) { if (in instanceof ReadyTransactionReply) { ActorPath cohortPath = @@ -127,10 +134,13 @@ public class BasicIntegrationTest extends AbstractActorTest { Assert.assertNotNull(cohort); + // Add a watch on the transaction actor so that we are notified when it dies + final ActorRef cohorActorRef = watchActor(cohort); + cohort.tell(new PreCommitTransaction(), getRef()); Boolean preCommitDone = - new ExpectMsg("match hint") { + new ExpectMsg("PreCommitTransactionReply") { protected Boolean match(Object in) { if (in instanceof PreCommitTransactionReply) { return true; @@ -142,10 +152,41 @@ public class BasicIntegrationTest extends AbstractActorTest { Assert.assertTrue(preCommitDone); + // FIXME : When we commit on the cohort it "kills" the Transaction. + // This in turn kills the child of Transaction as well. + // The order in which we receive the terminated event for both + // these actors is not fixed which may cause this test to fail cohort.tell(new CommitTransaction(), getRef()); + final Boolean terminatedCohort = + new ExpectMsg("Terminated Cohort") { + protected Boolean match(Object in) { + if (in instanceof Terminated) { + return cohorActorRef.equals(((Terminated) in).actor()); + } else { + throw noMatch(); + } + } + }.get(); // this extracts the received message + + Assert.assertTrue(terminatedCohort); + + + final Boolean terminatedTransaction = + new ExpectMsg("Terminated Transaction") { + protected Boolean match(Object in) { + if (in instanceof Terminated) { + return transactionActorRef.equals(((Terminated) in).actor()); + } else { + throw noMatch(); + } + } + }.get(); // this extracts the received message + + Assert.assertTrue(terminatedTransaction); + final Boolean commitDone = - new ExpectMsg("match hint") { + new ExpectMsg("CommitTransactionReply") { protected Boolean match(Object in) { if (in instanceof CommitTransactionReply) { return true; @@ -161,7 +202,25 @@ public class BasicIntegrationTest extends AbstractActorTest { }; - }}; + } + + private ActorRef watchActor(ActorSelection actor) { + Future future = actor + .resolveOne(FiniteDuration.apply(100, "milliseconds")); + + try { + ActorRef actorRef = Await.result(future, + FiniteDuration.apply(100, "milliseconds")); + + watch(actorRef); + + return actorRef; + } catch (Exception e) { + throw new RuntimeException(e); + } + + } + }; } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationProxyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationProxyTest.java index be7be1723d..33b5d95611 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationProxyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationProxyTest.java @@ -17,6 +17,8 @@ import java.util.List; public class DataChangeListenerRegistrationProxyTest extends AbstractActorTest{ + private ActorRef dataChangeListenerActor = getSystem().actorOf(Props.create(DoNothingActor.class)); + private static class MockDataChangeListener implements AsyncDataChangeListener> { @@ -36,7 +38,7 @@ public class DataChangeListenerRegistrationProxyTest extends AbstractActorTest{ DataChangeListenerRegistrationProxy proxy = new DataChangeListenerRegistrationProxy( getSystem().actorSelection(actorRef.path()), - listener); + listener, dataChangeListenerActor); Assert.assertEquals(listener, proxy.getInstance()); @@ -50,7 +52,7 @@ public class DataChangeListenerRegistrationProxyTest extends AbstractActorTest{ DataChangeListenerRegistrationProxy proxy = new DataChangeListenerRegistrationProxy( getSystem().actorSelection(actorRef.path()), - new MockDataChangeListener()); + new MockDataChangeListener(), dataChangeListenerActor); proxy.close(); diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerTest.java new file mode 100644 index 0000000000..6f0816be5c --- /dev/null +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerTest.java @@ -0,0 +1,102 @@ +package org.opendaylight.controller.cluster.datastore; + +import akka.actor.ActorRef; +import akka.actor.Props; +import akka.testkit.JavaTestKit; +import org.junit.Test; +import org.opendaylight.controller.cluster.datastore.messages.DataChanged; +import org.opendaylight.controller.cluster.datastore.messages.DataChangedReply; +import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent; +import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeListener; +import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; +import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; + +import java.util.Map; +import java.util.Set; + +import static org.junit.Assert.assertTrue; + +public class DataChangeListenerTest extends AbstractActorTest { + + private static class MockDataChangedEvent implements AsyncDataChangeEvent> { + + @Override + public Map> getCreatedData() { + throw new UnsupportedOperationException("getCreatedData"); + } + + @Override + public Map> getUpdatedData() { + throw new UnsupportedOperationException("getUpdatedData"); + } + + @Override public Set getRemovedPaths() { + throw new UnsupportedOperationException("getRemovedPaths"); + } + + @Override + public Map> getOriginalData() { + throw new UnsupportedOperationException("getOriginalData"); + } + + @Override public NormalizedNode getOriginalSubtree() { + throw new UnsupportedOperationException("getOriginalSubtree"); + } + + @Override public NormalizedNode getUpdatedSubtree() { + throw new UnsupportedOperationException("getUpdatedSubtree"); + } + } + + private class MockDataChangeListener implements AsyncDataChangeListener> { + private boolean gotIt = false; + + @Override public void onDataChanged( + AsyncDataChangeEvent> change) { + gotIt = true; + } + + public boolean gotIt() { + return gotIt; + } + } + + @Test + public void testDataChanged(){ + new JavaTestKit(getSystem()) {{ + final MockDataChangeListener listener = new MockDataChangeListener(); + final Props props = DataChangeListener.props(listener); + final ActorRef subject = + getSystem().actorOf(props, "testDataChanged"); + + new Within(duration("1 seconds")) { + protected void run() { + + subject.tell( + new DataChanged(new MockDataChangedEvent()), + getRef()); + + final Boolean out = new ExpectMsg("dataChanged") { + // do not put code outside this method, will run afterwards + protected Boolean match(Object in) { + if (in instanceof DataChangedReply) { + DataChangedReply reply = + (DataChangedReply) in; + return true; + } else { + throw noMatch(); + } + } + }.get(); // this extracts the received message + + assertTrue(out); + assertTrue(listener.gotIt()); + // Will wait for the rest of the 3 seconds + expectNoMsg(); + } + + + }; + }}; + } +} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreIntegrationTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreIntegrationTest.java new file mode 100644 index 0000000000..f400e74231 --- /dev/null +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreIntegrationTest.java @@ -0,0 +1,54 @@ +package org.opendaylight.controller.cluster.datastore; + +import com.google.common.base.Optional; +import com.google.common.util.concurrent.ListenableFuture; +import org.junit.Test; +import org.opendaylight.controller.md.cluster.datastore.model.TestModel; +import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadWriteTransaction; +import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort; +import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; +import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; + +import static junit.framework.Assert.assertEquals; +import static junit.framework.Assert.assertTrue; + +public class DistributedDataStoreIntegrationTest extends AbstractActorTest { + + @Test + public void integrationTest() throws Exception { + DistributedDataStore distributedDataStore = + new DistributedDataStore(getSystem(), "config"); + + distributedDataStore.onGlobalContextUpdated(TestModel.createTestContext()); + + DOMStoreReadWriteTransaction transaction = + distributedDataStore.newReadWriteTransaction(); + + transaction.write(TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME)); + + ListenableFuture>> future = + transaction.read(TestModel.TEST_PATH); + + Optional> optional = future.get(); + + NormalizedNode normalizedNode = optional.get(); + + assertEquals(TestModel.TEST_QNAME, normalizedNode.getNodeType()); + + DOMStoreThreePhaseCommitCohort ready = transaction.ready(); + + ListenableFuture canCommit = ready.canCommit(); + + assertTrue(canCommit.get()); + + ListenableFuture preCommit = ready.preCommit(); + + preCommit.get(); + + ListenableFuture commit = ready.commit(); + + commit.get(); + + } + +} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreTest.java index 3a74a4ca76..5f82b40140 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreTest.java @@ -39,7 +39,7 @@ public class DistributedDataStoreTest extends AbstractActorTest{ // Make CreateTransactionReply as the default response. Will need to be // tuned if a specific test requires some other response mockActorContext.setExecuteShardOperationResponse( - new CreateTransactionReply(doNothingActorRef.path())); + new CreateTransactionReply(doNothingActorRef.path(), "txn-1 ")); } @org.junit.After diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java index 48365fa1a0..ed447e004f 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java @@ -4,8 +4,10 @@ import akka.actor.ActorRef; import akka.actor.Props; import akka.testkit.JavaTestKit; import org.junit.Test; +import org.opendaylight.controller.cluster.datastore.messages.CreateTransaction; import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionChain; import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionChainReply; +import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionReply; import org.opendaylight.controller.cluster.datastore.messages.RegisterChangeListener; import org.opendaylight.controller.cluster.datastore.messages.RegisterChangeListenerReply; import org.opendaylight.controller.cluster.datastore.messages.UpdateSchemaContext; @@ -16,85 +18,142 @@ import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeListene import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -public class ShardTest extends AbstractActorTest{ - @Test - public void testOnReceiveCreateTransactionChain() throws Exception { - new JavaTestKit(getSystem()) {{ - final Props props = Shard.props("config"); - final ActorRef subject = getSystem().actorOf(props, "testCreateTransactionChain"); - - new Within(duration("1 seconds")) { - protected void run() { - - subject.tell(new CreateTransactionChain(), getRef()); - - final String out = new ExpectMsg("match hint") { - // do not put code outside this method, will run afterwards - protected String match(Object in) { - if (in instanceof CreateTransactionChainReply) { - CreateTransactionChainReply reply = (CreateTransactionChainReply) in; - return reply.getTransactionChainPath().toString(); - } else { - throw noMatch(); - } - } - }.get(); // this extracts the received message - - assertTrue(out.matches("akka:\\/\\/test\\/user\\/testCreateTransactionChain\\/\\$.*")); - // Will wait for the rest of the 3 seconds - expectNoMsg(); - } - - - }; - }}; - } - - @Test - public void testOnReceiveRegisterListener() throws Exception { - new JavaTestKit(getSystem()) {{ - final Props props = Shard.props("config"); - final ActorRef subject = getSystem().actorOf(props, "testRegisterChangeListener"); - - new Within(duration("1 seconds")) { - protected void run() { - - subject.tell(new UpdateSchemaContext(TestModel.createTestContext()), getRef()); - - subject.tell(new RegisterChangeListener(TestModel.TEST_PATH, getRef().path() , AsyncDataBroker.DataChangeScope.BASE), getRef()); +public class ShardTest extends AbstractActorTest { + @Test + public void testOnReceiveCreateTransactionChain() throws Exception { + new JavaTestKit(getSystem()) {{ + final Props props = Shard.props("config"); + final ActorRef subject = + getSystem().actorOf(props, "testCreateTransactionChain"); + + new Within(duration("1 seconds")) { + protected void run() { + + subject.tell(new CreateTransactionChain(), getRef()); + + final String out = new ExpectMsg("match hint") { + // do not put code outside this method, will run afterwards + protected String match(Object in) { + if (in instanceof CreateTransactionChainReply) { + CreateTransactionChainReply reply = + (CreateTransactionChainReply) in; + return reply.getTransactionChainPath() + .toString(); + } else { + throw noMatch(); + } + } + }.get(); // this extracts the received message + + assertEquals("Unexpected transaction path " + out, + "akka://test/user/testCreateTransactionChain/$a", + out); + + expectNoMsg(); + } + + + }; + }}; + } + + @Test + public void testOnReceiveRegisterListener() throws Exception { + new JavaTestKit(getSystem()) {{ + final Props props = Shard.props("config"); + final ActorRef subject = + getSystem().actorOf(props, "testRegisterChangeListener"); + + new Within(duration("1 seconds")) { + protected void run() { + + subject.tell( + new UpdateSchemaContext(TestModel.createTestContext()), + getRef()); + + subject.tell(new RegisterChangeListener(TestModel.TEST_PATH, + getRef().path(), AsyncDataBroker.DataChangeScope.BASE), + getRef()); + + final String out = new ExpectMsg("match hint") { + // do not put code outside this method, will run afterwards + protected String match(Object in) { + if (in instanceof RegisterChangeListenerReply) { + RegisterChangeListenerReply reply = + (RegisterChangeListenerReply) in; + return reply.getListenerRegistrationPath() + .toString(); + } else { + throw noMatch(); + } + } + }.get(); // this extracts the received message + + assertTrue(out.matches( + "akka:\\/\\/test\\/user\\/testRegisterChangeListener\\/\\$.*")); + // Will wait for the rest of the 3 seconds + expectNoMsg(); + } + + + }; + }}; + } + + @Test + public void testCreateTransaction(){ + new JavaTestKit(getSystem()) {{ + final Props props = Shard.props("config"); + final ActorRef subject = + getSystem().actorOf(props, "testCreateTransaction"); + + new Within(duration("1 seconds")) { + protected void run() { + + subject.tell( + new UpdateSchemaContext(TestModel.createTestContext()), + getRef()); + + subject.tell(new CreateTransaction("txn-1"), + getRef()); + + final String out = new ExpectMsg("match hint") { + // do not put code outside this method, will run afterwards + protected String match(Object in) { + if (in instanceof CreateTransactionReply) { + CreateTransactionReply reply = + (CreateTransactionReply) in; + return reply.getTransactionPath() + .toString(); + } else { + throw noMatch(); + } + } + }.get(); // this extracts the received message + + assertEquals("Unexpected transaction path " + out, + "akka://test/user/testCreateTransaction/shard-txn-1", + out); + expectNoMsg(); + } + + + }; + }}; + } + + + + private AsyncDataChangeListener> noOpDataChangeListener() { + return new AsyncDataChangeListener>() { + @Override + public void onDataChanged( + AsyncDataChangeEvent> change) { - final String out = new ExpectMsg("match hint") { - // do not put code outside this method, will run afterwards - protected String match(Object in) { - if (in instanceof RegisterChangeListenerReply) { - RegisterChangeListenerReply reply = (RegisterChangeListenerReply) in; - return reply.getListenerRegistrationPath().toString(); - } else { - throw noMatch(); - } } - }.get(); // this extracts the received message - - assertTrue(out.matches("akka:\\/\\/test\\/user\\/testRegisterChangeListener\\/\\$.*")); - // Will wait for the rest of the 3 seconds - expectNoMsg(); - } - - - }; - }}; - } - - - - private AsyncDataChangeListener> noOpDataChangeListener(){ - return new AsyncDataChangeListener>() { - @Override - public void onDataChanged(AsyncDataChangeEvent> change) { - - } - }; - } + }; + } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionChainTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionChainTest.java index bc3a104656..b07cbfd87c 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionChainTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionChainTest.java @@ -14,7 +14,6 @@ import org.opendaylight.controller.md.cluster.datastore.model.TestModel; import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; public class ShardTransactionChainTest extends AbstractActorTest { @@ -34,7 +33,7 @@ public class ShardTransactionChainTest extends AbstractActorTest { new Within(duration("1 seconds")) { protected void run() { - subject.tell(new CreateTransaction(), getRef()); + subject.tell(new CreateTransaction("txn-1"), getRef()); final String out = new ExpectMsg("match hint") { // do not put code outside this method, will run afterwards @@ -47,8 +46,11 @@ public class ShardTransactionChainTest extends AbstractActorTest { } }.get(); // this extracts the received message - assertTrue(out.matches("akka:\\/\\/test\\/user\\/testCreateTransaction\\/\\$.*")); - // Will wait for the rest of the 3 seconds + assertEquals("Unexpected transaction path " + out, + "akka://test/user/testCreateTransaction/shard-txn-1", + out); + + // Will wait for the rest of the 3 seconds expectNoMsg(); } @@ -88,4 +90,4 @@ public class ShardTransactionChainTest extends AbstractActorTest { }; }}; } -} \ No newline at end of file +} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionTest.java index 9116f24c92..2d9ae93d9e 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionTest.java @@ -2,6 +2,7 @@ package org.opendaylight.controller.cluster.datastore; import akka.actor.ActorRef; import akka.actor.Props; +import akka.actor.Terminated; import akka.testkit.JavaTestKit; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; @@ -32,246 +33,326 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; public class ShardTransactionTest extends AbstractActorTest { - private static ListeningExecutorService storeExecutor = MoreExecutors.listeningDecorator(MoreExecutors.sameThreadExecutor()); + private static ListeningExecutorService storeExecutor = + MoreExecutors.listeningDecorator(MoreExecutors.sameThreadExecutor()); + + private static final InMemoryDOMDataStore store = + new InMemoryDOMDataStore("OPER", storeExecutor); + + static { + store.onGlobalContextUpdated(TestModel.createTestContext()); + } + + @Test + public void testOnReceiveReadData() throws Exception { + new JavaTestKit(getSystem()) {{ + final ActorRef shard = getSystem().actorOf(Shard.props("config")); + final Props props = + ShardTransaction.props(store.newReadWriteTransaction(), shard); + final ActorRef subject = getSystem().actorOf(props, "testReadData"); + + new Within(duration("1 seconds")) { + protected void run() { + + subject.tell( + new ReadData(InstanceIdentifier.builder().build()), + getRef()); + + final String out = new ExpectMsg("match hint") { + // do not put code outside this method, will run afterwards + protected String match(Object in) { + if (in instanceof ReadDataReply) { + if (((ReadDataReply) in).getNormalizedNode() + != null) { + return "match"; + } + return null; + } else { + throw noMatch(); + } + } + }.get(); // this extracts the received message + + assertEquals("match", out); + + expectNoMsg(); + } + + + }; + }}; + } + + @Test + public void testOnReceiveReadDataWhenDataNotFound() throws Exception { + new JavaTestKit(getSystem()) {{ + final ActorRef shard = getSystem().actorOf(Shard.props("config")); + final Props props = + ShardTransaction.props(store.newReadWriteTransaction(), shard); + final ActorRef subject = getSystem().actorOf(props, "testReadDataWhenDataNotFound"); + + new Within(duration("1 seconds")) { + protected void run() { + + subject.tell( + new ReadData(TestModel.TEST_PATH), + getRef()); + + final String out = new ExpectMsg("match hint") { + // do not put code outside this method, will run afterwards + protected String match(Object in) { + if (in instanceof ReadDataReply) { + if (((ReadDataReply) in).getNormalizedNode() + == null) { + return "match"; + } + return null; + } else { + throw noMatch(); + } + } + }.get(); // this extracts the received message + + assertEquals("match", out); + + expectNoMsg(); + } + + + }; + }}; + } + + private void assertModification(final ActorRef subject, + final Class modificationType) { + new JavaTestKit(getSystem()) {{ + new Within(duration("1 seconds")) { + protected void run() { + subject + .tell(new ShardTransaction.GetCompositedModification(), + getRef()); + + final CompositeModification compositeModification = + new ExpectMsg("match hint") { + // do not put code outside this method, will run afterwards + protected CompositeModification match(Object in) { + if (in instanceof ShardTransaction.GetCompositeModificationReply) { + return ((ShardTransaction.GetCompositeModificationReply) in) + .getModification(); + } else { + throw noMatch(); + } + } + }.get(); // this extracts the received message + + assertTrue( + compositeModification.getModifications().size() == 1); + assertEquals(modificationType, + compositeModification.getModifications().get(0) + .getClass()); + + } + }; + }}; + } + + @Test + public void testOnReceiveWriteData() throws Exception { + new JavaTestKit(getSystem()) {{ + final ActorRef shard = getSystem().actorOf(Shard.props("config")); + final Props props = + ShardTransaction.props(store.newReadWriteTransaction(), shard); + final ActorRef subject = + getSystem().actorOf(props, "testWriteData"); + + new Within(duration("1 seconds")) { + protected void run() { + + subject.tell(new WriteData(TestModel.TEST_PATH, + ImmutableNodes.containerNode(TestModel.TEST_QNAME)), + getRef()); + + final String out = new ExpectMsg("match hint") { + // do not put code outside this method, will run afterwards + protected String match(Object in) { + if (in instanceof WriteDataReply) { + return "match"; + } else { + throw noMatch(); + } + } + }.get(); // this extracts the received message + + assertEquals("match", out); + + assertModification(subject, WriteModification.class); + expectNoMsg(); + } + - private static final InMemoryDOMDataStore store = new InMemoryDOMDataStore("OPER", storeExecutor); + }; + }}; + } - static { - store.onGlobalContextUpdated(TestModel.createTestContext()); - } + @Test + public void testOnReceiveMergeData() throws Exception { + new JavaTestKit(getSystem()) {{ + final ActorRef shard = getSystem().actorOf(Shard.props("config")); + final Props props = + ShardTransaction.props(store.newReadWriteTransaction(), shard); + final ActorRef subject = + getSystem().actorOf(props, "testMergeData"); - @Test - public void testOnReceiveReadData() throws Exception { - new JavaTestKit(getSystem()) {{ - final ActorRef shard = getSystem().actorOf(Shard.props("config")); - final Props props = ShardTransaction.props(store.newReadWriteTransaction(), shard); - final ActorRef subject = getSystem().actorOf(props, "testReadData"); + new Within(duration("1 seconds")) { + protected void run() { - new Within(duration("1 seconds")) { - protected void run() { + subject.tell(new MergeData(TestModel.TEST_PATH, + ImmutableNodes.containerNode(TestModel.TEST_QNAME)), + getRef()); - subject.tell(new ReadData(InstanceIdentifier.builder().build()), getRef()); + final String out = new ExpectMsg("match hint") { + // do not put code outside this method, will run afterwards + protected String match(Object in) { + if (in instanceof MergeDataReply) { + return "match"; + } else { + throw noMatch(); + } + } + }.get(); // this extracts the received message - final String out = new ExpectMsg("match hint") { - // do not put code outside this method, will run afterwards - protected String match(Object in) { - if (in instanceof ReadDataReply) { - if (((ReadDataReply) in).getNormalizedNode() != null) { - return "match"; + assertEquals("match", out); + + assertModification(subject, MergeModification.class); + + expectNoMsg(); } - return null; - } else { - throw noMatch(); - } - } - }.get(); // this extracts the received message - - assertEquals("match", out); - - expectNoMsg(); - } - - - }; - }}; - } - - private void assertModification(final ActorRef subject, final Class modificationType){ - new JavaTestKit(getSystem()) {{ - new Within(duration("1 seconds")) { - protected void run() { - subject.tell(new ShardTransaction.GetCompositedModification(), getRef()); - - final CompositeModification compositeModification = new ExpectMsg("match hint") { - // do not put code outside this method, will run afterwards - protected CompositeModification match(Object in) { - if (in instanceof ShardTransaction.GetCompositeModificationReply) { - return ((ShardTransaction.GetCompositeModificationReply) in).getModification(); - } else { - throw noMatch(); - } - } - }.get(); // this extracts the received message - - assertTrue(compositeModification.getModifications().size() == 1); - assertEquals(modificationType, compositeModification.getModifications().get(0).getClass()); - - } - }; - }}; - } - - @Test - public void testOnReceiveWriteData() throws Exception { - new JavaTestKit(getSystem()) {{ - final ActorRef shard = getSystem().actorOf(Shard.props("config")); - final Props props = ShardTransaction.props(store.newReadWriteTransaction(), shard); - final ActorRef subject = getSystem().actorOf(props, "testWriteData"); - - new Within(duration("1 seconds")) { - protected void run() { - - subject.tell(new WriteData(TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME)), getRef()); - - final String out = new ExpectMsg("match hint") { - // do not put code outside this method, will run afterwards - protected String match(Object in) { - if (in instanceof WriteDataReply) { - return "match"; - } else { - throw noMatch(); - } - } - }.get(); // this extracts the received message - - assertEquals("match", out); - - assertModification(subject, WriteModification.class); - expectNoMsg(); - } - - - }; - }}; - } - - @Test - public void testOnReceiveMergeData() throws Exception { - new JavaTestKit(getSystem()) {{ - final ActorRef shard = getSystem().actorOf(Shard.props("config")); - final Props props = ShardTransaction.props(store.newReadWriteTransaction(), shard); - final ActorRef subject = getSystem().actorOf(props, "testMergeData"); - - new Within(duration("1 seconds")) { - protected void run() { - - subject.tell(new MergeData(TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME)), getRef()); - - final String out = new ExpectMsg("match hint") { - // do not put code outside this method, will run afterwards - protected String match(Object in) { - if (in instanceof MergeDataReply) { - return "match"; - } else { - throw noMatch(); - } - } - }.get(); // this extracts the received message - - assertEquals("match", out); - - assertModification(subject, MergeModification.class); - - expectNoMsg(); - } - - - }; - }}; - } - - @Test - public void testOnReceiveDeleteData() throws Exception { - new JavaTestKit(getSystem()) {{ - final ActorRef shard = getSystem().actorOf(Shard.props("config")); - final Props props = ShardTransaction.props(store.newReadWriteTransaction(), shard); - final ActorRef subject = getSystem().actorOf(props, "testDeleteData"); - new Within(duration("1 seconds")) { - protected void run() { - subject.tell(new DeleteData(TestModel.TEST_PATH), getRef()); + }; + }}; + } - final String out = new ExpectMsg("match hint") { - // do not put code outside this method, will run afterwards - protected String match(Object in) { - if (in instanceof DeleteDataReply) { - return "match"; - } else { - throw noMatch(); - } - } - }.get(); // this extracts the received message + @Test + public void testOnReceiveDeleteData() throws Exception { + new JavaTestKit(getSystem()) {{ + final ActorRef shard = getSystem().actorOf(Shard.props("config")); + final Props props = + ShardTransaction.props(store.newReadWriteTransaction(), shard); + final ActorRef subject = + getSystem().actorOf(props, "testDeleteData"); - assertEquals("match", out); + new Within(duration("1 seconds")) { + protected void run() { - assertModification(subject, DeleteModification.class); - expectNoMsg(); - } + subject.tell(new DeleteData(TestModel.TEST_PATH), getRef()); + final String out = new ExpectMsg("match hint") { + // do not put code outside this method, will run afterwards + protected String match(Object in) { + if (in instanceof DeleteDataReply) { + return "match"; + } else { + throw noMatch(); + } + } + }.get(); // this extracts the received message - }; - }}; - } + assertEquals("match", out); + assertModification(subject, DeleteModification.class); + expectNoMsg(); + } - @Test - public void testOnReceiveReadyTransaction() throws Exception { - new JavaTestKit(getSystem()) {{ - final ActorRef shard = getSystem().actorOf(Shard.props("config")); - final Props props = ShardTransaction.props(store.newReadWriteTransaction(), shard); - final ActorRef subject = getSystem().actorOf(props, "testReadyTransaction"); - new Within(duration("1 seconds")) { - protected void run() { + }; + }}; + } - subject.tell(new ReadyTransaction(), getRef()); - final String out = new ExpectMsg("match hint") { - // do not put code outside this method, will run afterwards - protected String match(Object in) { - if (in instanceof ReadyTransactionReply) { - return "match"; - } else { - throw noMatch(); - } - } - }.get(); // this extracts the received message + @Test + public void testOnReceiveReadyTransaction() throws Exception { + new JavaTestKit(getSystem()) {{ + final ActorRef shard = getSystem().actorOf(Shard.props("config")); + final Props props = + ShardTransaction.props(store.newReadWriteTransaction(), shard); + final ActorRef subject = + getSystem().actorOf(props, "testReadyTransaction"); - assertEquals("match", out); + new Within(duration("1 seconds")) { + protected void run() { - expectNoMsg(); - } + subject.tell(new ReadyTransaction(), getRef()); + final String out = new ExpectMsg("match hint") { + // do not put code outside this method, will run afterwards + protected String match(Object in) { + if (in instanceof ReadyTransactionReply) { + return "match"; + } else { + throw noMatch(); + } + } + }.get(); // this extracts the received message - }; - }}; + assertEquals("match", out); + + expectNoMsg(); + } - } - @Test - public void testOnReceiveCloseTransaction() throws Exception { - new JavaTestKit(getSystem()) {{ - final ActorRef shard = getSystem().actorOf(Shard.props("config")); - final Props props = ShardTransaction.props(store.newReadWriteTransaction(), shard); - final ActorRef subject = getSystem().actorOf(props, "testCloseTransaction"); + }; + }}; - new Within(duration("1 seconds")) { - protected void run() { + } - subject.tell(new CloseTransaction(), getRef()); + @Test + public void testOnReceiveCloseTransaction() throws Exception { + new JavaTestKit(getSystem()) {{ + final ActorRef shard = getSystem().actorOf(Shard.props("config")); + final Props props = + ShardTransaction.props(store.newReadWriteTransaction(), shard); + final ActorRef subject = + getSystem().actorOf(props, "testCloseTransaction"); - final String out = new ExpectMsg("match hint") { - // do not put code outside this method, will run afterwards - protected String match(Object in) { - if (in instanceof CloseTransactionReply) { - return "match"; - } else { - throw noMatch(); - } - } - }.get(); // this extracts the received message + watch(subject); - assertEquals("match", out); + new Within(duration("2 seconds")) { + protected void run() { - expectNoMsg(); - } + subject.tell(new CloseTransaction(), getRef()); + final String out = new ExpectMsg("match hint") { + // do not put code outside this method, will run afterwards + protected String match(Object in) { + if (in instanceof CloseTransactionReply) { + return "match"; + } else { + throw noMatch(); + } + } + }.get(); // this extracts the received message - }; - }}; + assertEquals("match", out); + + final String termination = new ExpectMsg("match hint") { + // do not put code outside this method, will run afterwards + protected String match(Object in) { + if (in instanceof Terminated) { + return "match"; + } else { + throw noMatch(); + } + } + }.get(); // this extracts the received message + + + expectNoMsg(); + } - } + }; + }}; -} \ No newline at end of file + } +} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxyTest.java new file mode 100644 index 0000000000..8ff785c879 --- /dev/null +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxyTest.java @@ -0,0 +1,85 @@ +package org.opendaylight.controller.cluster.datastore; + +import akka.actor.ActorRef; +import akka.actor.Props; +import com.google.common.util.concurrent.ListenableFuture; +import junit.framework.Assert; +import org.junit.Before; +import org.junit.Test; +import org.opendaylight.controller.cluster.datastore.messages.AbortTransactionReply; +import org.opendaylight.controller.cluster.datastore.messages.CanCommitTransactionReply; +import org.opendaylight.controller.cluster.datastore.messages.CommitTransactionReply; +import org.opendaylight.controller.cluster.datastore.messages.PreCommitTransactionReply; +import org.opendaylight.controller.cluster.datastore.utils.MessageCollectorActor; +import org.opendaylight.controller.cluster.datastore.utils.MockActorContext; + +import java.util.Arrays; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +import static org.junit.Assert.assertNotNull; + +public class ThreePhaseCommitCohortProxyTest extends AbstractActorTest { + + private ThreePhaseCommitCohortProxy proxy; + private Props props; + private ActorRef actorRef; + private MockActorContext actorContext; + private ExecutorService executor = Executors.newSingleThreadExecutor(); + + @Before + public void setUp(){ + props = Props.create(MessageCollectorActor.class); + actorRef = getSystem().actorOf(props); + actorContext = new MockActorContext(this.getSystem()); + + proxy = + new ThreePhaseCommitCohortProxy(actorContext, + Arrays.asList(actorRef.path()), "txn-1", executor); + + } + + @Test + public void testCanCommit() throws Exception { + actorContext.setExecuteRemoteOperationResponse(new CanCommitTransactionReply(true)); + + ListenableFuture future = proxy.canCommit(); + + Assert.assertTrue(future.get().booleanValue()); + + } + + @Test + public void testPreCommit() throws Exception { + actorContext.setExecuteRemoteOperationResponse(new PreCommitTransactionReply()); + + ListenableFuture future = proxy.preCommit(); + + future.get(); + + } + + @Test + public void testAbort() throws Exception { + actorContext.setExecuteRemoteOperationResponse(new AbortTransactionReply()); + + ListenableFuture future = proxy.abort(); + + future.get(); + + } + + @Test + public void testCommit() throws Exception { + actorContext.setExecuteRemoteOperationResponse(new CommitTransactionReply()); + + ListenableFuture future = proxy.commit(); + + future.get(); + } + + @Test + public void testGetCohortPaths() throws Exception { + assertNotNull(proxy.getCohortPaths()); + } +} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java index 6d057a4dbe..a8df49f5ca 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java @@ -23,21 +23,26 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; import java.util.List; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; public class TransactionProxyTest extends AbstractActorTest { + private ExecutorService transactionExecutor = + Executors.newSingleThreadExecutor(); + @Test public void testRead() throws Exception { final Props props = Props.create(DoNothingActor.class); final ActorRef actorRef = getSystem().actorOf(props); final MockActorContext actorContext = new MockActorContext(this.getSystem()); - actorContext.setExecuteShardOperationResponse(new CreateTransactionReply(actorRef.path())); + actorContext.setExecuteShardOperationResponse(createTransactionReply(actorRef)); actorContext.setExecuteRemoteOperationResponse("message"); TransactionProxy transactionProxy = new TransactionProxy(actorContext, - TransactionProxy.TransactionType.READ_ONLY); + TransactionProxy.TransactionType.READ_ONLY, transactionExecutor); ListenableFuture>> read = @@ -57,18 +62,49 @@ public class TransactionProxyTest extends AbstractActorTest { Assert.assertTrue(normalizedNodeOptional.isPresent()); } + @Test + public void testReadWhenANullIsReturned() throws Exception { + final Props props = Props.create(DoNothingActor.class); + final ActorRef actorRef = getSystem().actorOf(props); + + final MockActorContext actorContext = new MockActorContext(this.getSystem()); + actorContext.setExecuteShardOperationResponse(createTransactionReply(actorRef)); + actorContext.setExecuteRemoteOperationResponse("message"); + + TransactionProxy transactionProxy = + new TransactionProxy(actorContext, + TransactionProxy.TransactionType.READ_ONLY, transactionExecutor); + + + ListenableFuture>> read = + transactionProxy.read(TestModel.TEST_PATH); + + Optional> normalizedNodeOptional = read.get(); + + Assert.assertFalse(normalizedNodeOptional.isPresent()); + + actorContext.setExecuteRemoteOperationResponse(new ReadDataReply( + null)); + + read = transactionProxy.read(TestModel.TEST_PATH); + + normalizedNodeOptional = read.get(); + + Assert.assertFalse(normalizedNodeOptional.isPresent()); + } + @Test public void testWrite() throws Exception { final Props props = Props.create(MessageCollectorActor.class); final ActorRef actorRef = getSystem().actorOf(props); final MockActorContext actorContext = new MockActorContext(this.getSystem()); - actorContext.setExecuteShardOperationResponse(new CreateTransactionReply(actorRef.path())); + actorContext.setExecuteShardOperationResponse(createTransactionReply(actorRef)); actorContext.setExecuteRemoteOperationResponse("message"); TransactionProxy transactionProxy = new TransactionProxy(actorContext, - TransactionProxy.TransactionType.READ_ONLY); + TransactionProxy.TransactionType.READ_ONLY, transactionExecutor); transactionProxy.write(TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.NAME_QNAME)); @@ -95,12 +131,12 @@ public class TransactionProxyTest extends AbstractActorTest { final ActorRef actorRef = getSystem().actorOf(props); final MockActorContext actorContext = new MockActorContext(this.getSystem()); - actorContext.setExecuteShardOperationResponse(new CreateTransactionReply(actorRef.path())); + actorContext.setExecuteShardOperationResponse(createTransactionReply(actorRef)); actorContext.setExecuteRemoteOperationResponse("message"); TransactionProxy transactionProxy = new TransactionProxy(actorContext, - TransactionProxy.TransactionType.READ_ONLY); + TransactionProxy.TransactionType.READ_ONLY, transactionExecutor); transactionProxy.merge(TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.NAME_QNAME)); @@ -127,12 +163,12 @@ public class TransactionProxyTest extends AbstractActorTest { final ActorRef actorRef = getSystem().actorOf(props); final MockActorContext actorContext = new MockActorContext(this.getSystem()); - actorContext.setExecuteShardOperationResponse(new CreateTransactionReply(actorRef.path())); + actorContext.setExecuteShardOperationResponse(createTransactionReply(actorRef)); actorContext.setExecuteRemoteOperationResponse("message"); TransactionProxy transactionProxy = new TransactionProxy(actorContext, - TransactionProxy.TransactionType.READ_ONLY); + TransactionProxy.TransactionType.READ_ONLY, transactionExecutor); transactionProxy.delete(TestModel.TEST_PATH); @@ -158,12 +194,12 @@ public class TransactionProxyTest extends AbstractActorTest { final ActorRef doNothingActorRef = getSystem().actorOf(props); final MockActorContext actorContext = new MockActorContext(this.getSystem()); - actorContext.setExecuteShardOperationResponse(new CreateTransactionReply(doNothingActorRef.path())); + actorContext.setExecuteShardOperationResponse(createTransactionReply(doNothingActorRef)); actorContext.setExecuteRemoteOperationResponse(new ReadyTransactionReply(doNothingActorRef.path())); TransactionProxy transactionProxy = new TransactionProxy(actorContext, - TransactionProxy.TransactionType.READ_ONLY); + TransactionProxy.TransactionType.READ_ONLY, transactionExecutor); DOMStoreThreePhaseCommitCohort ready = transactionProxy.ready(); @@ -182,12 +218,11 @@ public class TransactionProxyTest extends AbstractActorTest { final ActorRef doNothingActorRef = getSystem().actorOf(props); final MockActorContext actorContext = new MockActorContext(this.getSystem()); - actorContext.setExecuteShardOperationResponse( - new CreateTransactionReply(doNothingActorRef.path())); + actorContext.setExecuteShardOperationResponse( createTransactionReply(doNothingActorRef) ); TransactionProxy transactionProxy = new TransactionProxy(actorContext, - TransactionProxy.TransactionType.READ_ONLY); + TransactionProxy.TransactionType.READ_ONLY, transactionExecutor); Assert.assertNotNull(transactionProxy.getIdentifier()); } @@ -198,12 +233,12 @@ public class TransactionProxyTest extends AbstractActorTest { final ActorRef actorRef = getSystem().actorOf(props); final MockActorContext actorContext = new MockActorContext(this.getSystem()); - actorContext.setExecuteShardOperationResponse(new CreateTransactionReply(actorRef.path())); + actorContext.setExecuteShardOperationResponse(createTransactionReply(actorRef)); actorContext.setExecuteRemoteOperationResponse("message"); TransactionProxy transactionProxy = new TransactionProxy(actorContext, - TransactionProxy.TransactionType.READ_ONLY); + TransactionProxy.TransactionType.READ_ONLY, transactionExecutor); transactionProxy.close(); @@ -222,4 +257,8 @@ public class TransactionProxyTest extends AbstractActorTest { Assert.assertTrue(listMessages.get(0) instanceof CloseTransaction); } + + private CreateTransactionReply createTransactionReply(ActorRef actorRef){ + return new CreateTransactionReply(actorRef.path(), "txn-1"); + } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/TestUtils.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/TestUtils.java new file mode 100644 index 0000000000..bb881d5322 --- /dev/null +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/TestUtils.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.controller.cluster.datastore.utils; + +import akka.actor.ActorRef; +import akka.actor.ActorSystem; +import akka.actor.Props; +import junit.framework.Assert; + +import java.util.List; + +public class TestUtils { + + public static void assertFirstSentMessage(ActorSystem actorSystem, ActorRef actorRef, Class clazz){ + ActorContext testContext = new ActorContext(actorSystem, actorSystem.actorOf( + Props.create(DoNothingActor.class))); + Object messages = testContext + .executeLocalOperation(actorRef, "messages", + ActorContext.ASK_DURATION); + + Assert.assertNotNull(messages); + + Assert.assertTrue(messages instanceof List); + + List listMessages = (List) messages; + + Assert.assertEquals(1, listMessages.size()); + + Assert.assertTrue(listMessages.get(0).getClass().equals(clazz)); + } +} diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/pom.xml b/opendaylight/md-sal/sal-protocolbuffer-encoding/pom.xml index 671a9441d8..5254c19fcb 100644 --- a/opendaylight/md-sal/sal-protocolbuffer-encoding/pom.xml +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/pom.xml @@ -23,6 +23,69 @@ junit test + + org.opendaylight.yangtools + util + + + org.opendaylight.yangtools + yang-common + + + org.opendaylight.yangtools + yang-data-api + + + org.opendaylight.yangtools + yang-data-impl + + + org.opendaylight.yangtools + yang-model-api + + + org.opendaylight.yangtools + yang-model-util + + + org.opendaylight.yangtools + yang-binding + + + com.google.guava + guava + + + junit + junit + test + + + + xmlunit + xmlunit + 1.5 + + + + org.opendaylight.yangtools + yang-parser-impl + + + commons-lang + commons-lang + + + org.slf4j + slf4j-simple + ${slf4j.version} + test + + + com.google.code.findbugs + jsr305 + 2.0.1 + diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/run.sh b/opendaylight/md-sal/sal-protocolbuffer-encoding/run.sh index 72e2c87ecb..b14da29f0a 100755 --- a/opendaylight/md-sal/sal-protocolbuffer-encoding/run.sh +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/run.sh @@ -27,4 +27,6 @@ protoc --proto_path=src/main/resources --java_out=src/main/java src/main/resources/*.proto -echo "Done generating Java source files." \ No newline at end of file +echo "Done generating Java source files." + +find src/main/java -type f -name '*.java' -exec sed --in-place 's/[[:space:]]\+$//' {} \+ diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/common/SimpleNormalizedNodeMessage.java b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/common/SimpleNormalizedNodeMessage.java new file mode 100644 index 0000000000..4fa8934d6d --- /dev/null +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/common/SimpleNormalizedNodeMessage.java @@ -0,0 +1,743 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SimpleNormalizedNode.proto + +package org.opendaylight.controller.cluster.datastore.common; + +public final class SimpleNormalizedNodeMessage { + private SimpleNormalizedNodeMessage() {} + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) {} + + public interface NormalizedNodeXmlOrBuilder extends + com.google.protobuf.MessageOrBuilder { + + // required string nodeIdentifier = 1; + /** + * required string nodeIdentifier = 1; + */ + boolean hasNodeIdentifier(); + + /** + * required string nodeIdentifier = 1; + */ + java.lang.String getNodeIdentifier(); + + /** + * required string nodeIdentifier = 1; + */ + com.google.protobuf.ByteString getNodeIdentifierBytes(); + + // required string xmlString = 2; + /** + * required string xmlString = 2; + */ + boolean hasXmlString(); + + /** + * required string xmlString = 2; + */ + java.lang.String getXmlString(); + + /** + * required string xmlString = 2; + */ + com.google.protobuf.ByteString getXmlStringBytes(); + } + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.NormalizedNodeXml} + */ + public static final class NormalizedNodeXml extends + com.google.protobuf.GeneratedMessage implements + NormalizedNodeXmlOrBuilder { + // Use NormalizedNodeXml.newBuilder() to construct. + private NormalizedNodeXml( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + + private NormalizedNodeXml(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + + private static final NormalizedNodeXml defaultInstance; + + public static NormalizedNodeXml getDefaultInstance() { + return defaultInstance; + } + + public NormalizedNodeXml getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NormalizedNodeXml(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + nodeIdentifier_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + xmlString_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { + return org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.class, + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public NormalizedNodeXml parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NormalizedNodeXml(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string nodeIdentifier = 1; + public static final int NODEIDENTIFIER_FIELD_NUMBER = 1; + private java.lang.Object nodeIdentifier_; + + /** + * required string nodeIdentifier = 1; + */ + public boolean hasNodeIdentifier() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + + /** + * required string nodeIdentifier = 1; + */ + public java.lang.String getNodeIdentifier() { + java.lang.Object ref = nodeIdentifier_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + nodeIdentifier_ = s; + } + return s; + } + } + + /** + * required string nodeIdentifier = 1; + */ + public com.google.protobuf.ByteString getNodeIdentifierBytes() { + java.lang.Object ref = nodeIdentifier_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nodeIdentifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string xmlString = 2; + public static final int XMLSTRING_FIELD_NUMBER = 2; + private java.lang.Object xmlString_; + + /** + * required string xmlString = 2; + */ + public boolean hasXmlString() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + + /** + * required string xmlString = 2; + */ + public java.lang.String getXmlString() { + java.lang.Object ref = xmlString_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + xmlString_ = s; + } + return s; + } + } + + /** + * required string xmlString = 2; + */ + public com.google.protobuf.ByteString getXmlStringBytes() { + java.lang.Object ref = xmlString_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + xmlString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + nodeIdentifier_ = ""; + xmlString_ = ""; + } + + private byte memoizedIsInitialized = -1; + + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) + return isInitialized == 1; + + if (!hasNodeIdentifier()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasXmlString()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNodeIdentifierBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getXmlStringBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) + return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize(1, + getNodeIdentifierBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize(2, + getXmlStringBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom( + java.io.InputStream input) throws java.io.IOException { + return PARSER.parseFrom(input); + } + + public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + + public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return PARSER.parseFrom(input); + } + + public static org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.NormalizedNodeXml} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { + return org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.class, + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder.class); + } + + // Construct using + // org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + nodeIdentifier_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + xmlString_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor; + } + + public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getDefaultInstanceForType() { + return org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .getDefaultInstance(); + } + + public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml build() { + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml buildPartial() { + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml result = + new org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml( + this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.nodeIdentifier_ = nodeIdentifier_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.xmlString_ = xmlString_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml) { + return mergeFrom((org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml other) { + if (other == org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .getDefaultInstance()) + return this; + if (other.hasNodeIdentifier()) { + bitField0_ |= 0x00000001; + nodeIdentifier_ = other.nodeIdentifier_; + onChanged(); + } + if (other.hasXmlString()) { + bitField0_ |= 0x00000002; + xmlString_ = other.xmlString_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasNodeIdentifier()) { + + return false; + } + if (!hasXmlString()) { + + return false; + } + return true; + } + + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml) e + .getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + // required string nodeIdentifier = 1; + private java.lang.Object nodeIdentifier_ = ""; + + /** + * required string nodeIdentifier = 1; + */ + public boolean hasNodeIdentifier() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + + /** + * required string nodeIdentifier = 1; + */ + public java.lang.String getNodeIdentifier() { + java.lang.Object ref = nodeIdentifier_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = + ((com.google.protobuf.ByteString) ref).toStringUtf8(); + nodeIdentifier_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * required string nodeIdentifier = 1; + */ + public com.google.protobuf.ByteString getNodeIdentifierBytes() { + java.lang.Object ref = nodeIdentifier_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString + .copyFromUtf8((java.lang.String) ref); + nodeIdentifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * required string nodeIdentifier = 1; + */ + public Builder setNodeIdentifier(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + nodeIdentifier_ = value; + onChanged(); + return this; + } + + /** + * required string nodeIdentifier = 1; + */ + public Builder clearNodeIdentifier() { + bitField0_ = (bitField0_ & ~0x00000001); + nodeIdentifier_ = getDefaultInstance().getNodeIdentifier(); + onChanged(); + return this; + } + + /** + * required string nodeIdentifier = 1; + */ + public Builder setNodeIdentifierBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + nodeIdentifier_ = value; + onChanged(); + return this; + } + + // required string xmlString = 2; + private java.lang.Object xmlString_ = ""; + + /** + * required string xmlString = 2; + */ + public boolean hasXmlString() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + + /** + * required string xmlString = 2; + */ + public java.lang.String getXmlString() { + java.lang.Object ref = xmlString_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = + ((com.google.protobuf.ByteString) ref).toStringUtf8(); + xmlString_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * required string xmlString = 2; + */ + public com.google.protobuf.ByteString getXmlStringBytes() { + java.lang.Object ref = xmlString_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString + .copyFromUtf8((java.lang.String) ref); + xmlString_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * required string xmlString = 2; + */ + public Builder setXmlString(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + xmlString_ = value; + onChanged(); + return this; + } + + /** + * required string xmlString = 2; + */ + public Builder clearXmlString() { + bitField0_ = (bitField0_ & ~0x00000002); + xmlString_ = getDefaultInstance().getXmlString(); + onChanged(); + return this; + } + + /** + * required string xmlString = 2; + */ + public Builder setXmlStringBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + xmlString_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.NormalizedNodeXml) + } + + static { + defaultInstance = new NormalizedNodeXml(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.NormalizedNodeXml) + } + + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + static { + java.lang.String[] descriptorData = + {"\n\032SimpleNormalizedNode.proto\022!org.openda" + + "ylight.controller.mdsal\">\n\021NormalizedNod" + + "eXml\022\026\n\016nodeIdentifier\030\001 \002(\t\022\021\n\txmlStrin" + + "g\030\002 \002(\tBS\n4org.opendaylight.controller.c" + + "luster.datastore.commonB\033SimpleNormalize" + "dNodeMessage"}; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor, + new java.lang.String[] {"NodeIdentifier", "XmlString",}); + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[]{}, assigner); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/datachange/notification/DataChangeListenerMessages.java b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/datachange/notification/DataChangeListenerMessages.java new file mode 100644 index 0000000000..5e9e454006 --- /dev/null +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/datachange/notification/DataChangeListenerMessages.java @@ -0,0 +1,1213 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: DataChangeListener.proto + +package org.opendaylight.controller.cluster.datastore.datachange.notification; + +public final class DataChangeListenerMessages { + private DataChangeListenerMessages() {} + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) {} + + public interface DataChangedOrBuilder extends + com.google.protobuf.MessageOrBuilder { + + // repeated string instanceIdentifierPathArguments = 1; + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + java.util.List getInstanceIdentifierPathArgumentsList(); + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + int getInstanceIdentifierPathArgumentsCount(); + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + java.lang.String getInstanceIdentifierPathArguments(int index); + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + com.google.protobuf.ByteString getInstanceIdentifierPathArgumentsBytes( + int index); + + // required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2; + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2; + */ + boolean hasNormalizedNodeXml(); + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2; + */ + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getNormalizedNodeXml(); + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2; + */ + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder getNormalizedNodeXmlOrBuilder(); + } + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.DataChanged} + */ + public static final class DataChanged extends + com.google.protobuf.GeneratedMessage implements DataChangedOrBuilder { + // Use DataChanged.newBuilder() to construct. + private DataChanged(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + + private DataChanged(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + + private static final DataChanged defaultInstance; + + public static DataChanged getDefaultInstance() { + return defaultInstance; + } + + public DataChanged getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DataChanged(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + instanceIdentifierPathArguments_ = + new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + instanceIdentifierPathArguments_.add(input.readBytes()); + break; + } + case 18: { + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder subBuilder = + null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = normalizedNodeXml_.toBuilder(); + } + normalizedNodeXml_ = + input + .readMessage( + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.PARSER, + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(normalizedNodeXml_); + normalizedNodeXml_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + instanceIdentifierPathArguments_ = + new com.google.protobuf.UnmodifiableLazyStringList( + instanceIdentifierPathArguments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChanged_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { + return org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChanged_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged.class, + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public DataChanged parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataChanged(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // repeated string instanceIdentifierPathArguments = 1; + public static final int INSTANCEIDENTIFIERPATHARGUMENTS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList instanceIdentifierPathArguments_; + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public java.util.List getInstanceIdentifierPathArgumentsList() { + return instanceIdentifierPathArguments_; + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public int getInstanceIdentifierPathArgumentsCount() { + return instanceIdentifierPathArguments_.size(); + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public java.lang.String getInstanceIdentifierPathArguments(int index) { + return instanceIdentifierPathArguments_.get(index); + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public com.google.protobuf.ByteString getInstanceIdentifierPathArgumentsBytes( + int index) { + return instanceIdentifierPathArguments_.getByteString(index); + } + + // required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2; + public static final int NORMALIZEDNODEXML_FIELD_NUMBER = 2; + private org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml normalizedNodeXml_; + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2; + */ + public boolean hasNormalizedNodeXml() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2; + */ + public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getNormalizedNodeXml() { + return normalizedNodeXml_; + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2; + */ + public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder getNormalizedNodeXmlOrBuilder() { + return normalizedNodeXml_; + } + + private void initFields() { + instanceIdentifierPathArguments_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + normalizedNodeXml_ = + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) + return isInitialized == 1; + + if (!hasNormalizedNodeXml()) { + memoizedIsInitialized = 0; + return false; + } + if (!getNormalizedNodeXml().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < instanceIdentifierPathArguments_.size(); i++) { + output.writeBytes(1, instanceIdentifierPathArguments_.getByteString(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(2, normalizedNodeXml_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) + return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < instanceIdentifierPathArguments_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(instanceIdentifierPathArguments_ + .getByteString(i)); + } + size += dataSize; + size += 1 * getInstanceIdentifierPathArgumentsList().size(); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, + normalizedNodeXml_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom( + java.io.InputStream input) throws java.io.IOException { + return PARSER.parseFrom(input); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return PARSER.parseFrom(input); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.DataChanged} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChanged_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { + return org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChanged_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged.class, + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged.Builder.class); + } + + // Construct using + // org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getNormalizedNodeXmlFieldBuilder(); + } + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + instanceIdentifierPathArguments_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (normalizedNodeXmlBuilder_ == null) { + normalizedNodeXml_ = + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .getDefaultInstance(); + } else { + normalizedNodeXmlBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChanged_descriptor; + } + + public org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged getDefaultInstanceForType() { + return org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged + .getDefaultInstance(); + } + + public org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged build() { + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged buildPartial() { + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged result = + new org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged( + this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + instanceIdentifierPathArguments_ = + new com.google.protobuf.UnmodifiableLazyStringList( + instanceIdentifierPathArguments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.instanceIdentifierPathArguments_ = + instanceIdentifierPathArguments_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; + } + if (normalizedNodeXmlBuilder_ == null) { + result.normalizedNodeXml_ = normalizedNodeXml_; + } else { + result.normalizedNodeXml_ = normalizedNodeXmlBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged) { + return mergeFrom((org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged other) { + if (other == org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged + .getDefaultInstance()) + return this; + if (!other.instanceIdentifierPathArguments_.isEmpty()) { + if (instanceIdentifierPathArguments_.isEmpty()) { + instanceIdentifierPathArguments_ = + other.instanceIdentifierPathArguments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstanceIdentifierPathArgumentsIsMutable(); + instanceIdentifierPathArguments_ + .addAll(other.instanceIdentifierPathArguments_); + } + onChanged(); + } + if (other.hasNormalizedNodeXml()) { + mergeNormalizedNodeXml(other.getNormalizedNodeXml()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasNormalizedNodeXml()) { + + return false; + } + if (!getNormalizedNodeXml().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChanged) e + .getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + // repeated string instanceIdentifierPathArguments = 1; + private com.google.protobuf.LazyStringList instanceIdentifierPathArguments_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureInstanceIdentifierPathArgumentsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + instanceIdentifierPathArguments_ = + new com.google.protobuf.LazyStringArrayList( + instanceIdentifierPathArguments_); + bitField0_ |= 0x00000001; + } + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public java.util.List getInstanceIdentifierPathArgumentsList() { + return java.util.Collections + .unmodifiableList(instanceIdentifierPathArguments_); + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public int getInstanceIdentifierPathArgumentsCount() { + return instanceIdentifierPathArguments_.size(); + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public java.lang.String getInstanceIdentifierPathArguments(int index) { + return instanceIdentifierPathArguments_.get(index); + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public com.google.protobuf.ByteString getInstanceIdentifierPathArgumentsBytes( + int index) { + return instanceIdentifierPathArguments_.getByteString(index); + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public Builder setInstanceIdentifierPathArguments(int index, + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceIdentifierPathArgumentsIsMutable(); + instanceIdentifierPathArguments_.set(index, value); + onChanged(); + return this; + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public Builder addInstanceIdentifierPathArguments(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceIdentifierPathArgumentsIsMutable(); + instanceIdentifierPathArguments_.add(value); + onChanged(); + return this; + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public Builder addAllInstanceIdentifierPathArguments( + java.lang.Iterable values) { + ensureInstanceIdentifierPathArgumentsIsMutable(); + super.addAll(values, instanceIdentifierPathArguments_); + onChanged(); + return this; + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public Builder clearInstanceIdentifierPathArguments() { + instanceIdentifierPathArguments_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public Builder addInstanceIdentifierPathArgumentsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceIdentifierPathArgumentsIsMutable(); + instanceIdentifierPathArguments_.add(value); + onChanged(); + return this; + } + + // required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2; + private org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml normalizedNodeXml_ = + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder normalizedNodeXmlBuilder_; + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2; + */ + public boolean hasNormalizedNodeXml() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2; + */ + public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getNormalizedNodeXml() { + if (normalizedNodeXmlBuilder_ == null) { + return normalizedNodeXml_; + } else { + return normalizedNodeXmlBuilder_.getMessage(); + } + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2; + */ + public Builder setNormalizedNodeXml( + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml value) { + if (normalizedNodeXmlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + normalizedNodeXml_ = value; + onChanged(); + } else { + normalizedNodeXmlBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2; + */ + public Builder setNormalizedNodeXml( + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder builderForValue) { + if (normalizedNodeXmlBuilder_ == null) { + normalizedNodeXml_ = builderForValue.build(); + onChanged(); + } else { + normalizedNodeXmlBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2; + */ + public Builder mergeNormalizedNodeXml( + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml value) { + if (normalizedNodeXmlBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) + && normalizedNodeXml_ != org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .getDefaultInstance()) { + normalizedNodeXml_ = + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .newBuilder(normalizedNodeXml_).mergeFrom(value) + .buildPartial(); + } else { + normalizedNodeXml_ = value; + } + onChanged(); + } else { + normalizedNodeXmlBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2; + */ + public Builder clearNormalizedNodeXml() { + if (normalizedNodeXmlBuilder_ == null) { + normalizedNodeXml_ = + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .getDefaultInstance(); + onChanged(); + } else { + normalizedNodeXmlBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2; + */ + public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder getNormalizedNodeXmlBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getNormalizedNodeXmlFieldBuilder().getBuilder(); + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2; + */ + public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder getNormalizedNodeXmlOrBuilder() { + if (normalizedNodeXmlBuilder_ != null) { + return normalizedNodeXmlBuilder_.getMessageOrBuilder(); + } else { + return normalizedNodeXml_; + } + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNodeXml = 2; + */ + private com.google.protobuf.SingleFieldBuilder getNormalizedNodeXmlFieldBuilder() { + if (normalizedNodeXmlBuilder_ == null) { + normalizedNodeXmlBuilder_ = + new com.google.protobuf.SingleFieldBuilder( + normalizedNodeXml_, getParentForChildren(), isClean()); + normalizedNodeXml_ = null; + } + return normalizedNodeXmlBuilder_; + } + + // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.DataChanged) + } + + static { + defaultInstance = new DataChanged(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.DataChanged) + } + + public interface DataChangedReplyOrBuilder extends + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.DataChangedReply} + */ + public static final class DataChangedReply extends + com.google.protobuf.GeneratedMessage implements DataChangedReplyOrBuilder { + // Use DataChangedReply.newBuilder() to construct. + private DataChangedReply( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + + private DataChangedReply(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + + private static final DataChangedReply defaultInstance; + + public static DataChangedReply getDefaultInstance() { + return defaultInstance; + } + + public DataChangedReply getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DataChangedReply(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChangedReply_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { + return org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChangedReply_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply.class, + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public DataChangedReply parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataChangedReply(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() {} + + private byte memoizedIsInitialized = -1; + + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) + return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) + return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply parseFrom( + java.io.InputStream input) throws java.io.IOException { + return PARSER.parseFrom(input); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return PARSER.parseFrom(input); + } + + public static org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.DataChangedReply} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReplyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChangedReply_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { + return org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChangedReply_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply.class, + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply.Builder.class); + } + + // Construct using + // org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.internal_static_org_opendaylight_controller_mdsal_DataChangedReply_descriptor; + } + + public org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply getDefaultInstanceForType() { + return org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply + .getDefaultInstance(); + } + + public org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply build() { + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply buildPartial() { + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply result = + new org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply( + this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply) { + return mergeFrom((org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply other) { + if (other == org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply + .getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (org.opendaylight.controller.cluster.datastore.datachange.notification.DataChangeListenerMessages.DataChangedReply) e + .getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.DataChangedReply) + } + + static { + defaultInstance = new DataChangedReply(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.DataChangedReply) + } + + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_DataChanged_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_DataChanged_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_DataChangedReply_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_DataChangedReply_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + static { + java.lang.String[] descriptorData = + {"\n\030DataChangeListener.proto\022!org.opendayl" + + "ight.controller.mdsal\032\032SimpleNormalizedN" + + "ode.proto\"\207\001\n\013DataChanged\022\'\n\037instanceIde" + + "ntifierPathArguments\030\001 \003(\t\022O\n\021normalized" + + "NodeXml\030\002 \002(\01324.org.opendaylight.control" + + "ler.mdsal.NormalizedNodeXml\"\022\n\020DataChang" + + "edReplyBc\nEorg.opendaylight.controller.c" + + "luster.datastore.datachange.notification" + + "B\032DataChangeListenerMessages"}; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_org_opendaylight_controller_mdsal_DataChanged_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_opendaylight_controller_mdsal_DataChanged_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_DataChanged_descriptor, + new java.lang.String[] {"InstanceIdentifierPathArguments", + "NormalizedNodeXml",}); + internal_static_org_opendaylight_controller_mdsal_DataChangedReply_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_org_opendaylight_controller_mdsal_DataChangedReply_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_DataChangedReply_descriptor, + new java.lang.String[] {}); + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[]{org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage + .getDescriptor(),}, assigner); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/registration/ListenerRegistrationMessages.java b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/registration/ListenerRegistrationMessages.java index afcb455c97..8d82f8b387 100644 --- a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/registration/ListenerRegistrationMessages.java +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/registration/ListenerRegistrationMessages.java @@ -1,30 +1,34 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! +// Generated by the protocol buffer compiler. DO NOT EDIT! // source: ListenerRegistration.proto package org.opendaylight.controller.cluster.datastore.registration; public final class ListenerRegistrationMessages { private ListenerRegistrationMessages() {} + public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - public interface CloseOrBuilder - extends com.google.protobuf.MessageOrBuilder { + com.google.protobuf.ExtensionRegistry registry) {} + + public interface CloseOrBuilder extends com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code org.opendaylight.controller.mdsal.Close} */ - public static final class Close extends - com.google.protobuf.GeneratedMessage + public static final class Close extends com.google.protobuf.GeneratedMessage implements CloseOrBuilder { // Use Close.newBuilder() to construct. private Close(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private Close(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private Close(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final Close defaultInstance; + public static Close getDefaultInstance() { return defaultInstance; } @@ -34,13 +38,13 @@ public final class ListenerRegistrationMessages { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Close( - com.google.protobuf.CodedInputStream input, + + private Close(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); @@ -55,8 +59,8 @@ public final class ListenerRegistrationMessages { done = true; break; default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { done = true; } break; @@ -73,54 +77,58 @@ public final class ListenerRegistrationMessages { makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_Close_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_Close_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close.class, org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close.Builder.class); + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close.class, + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public Close parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Close(input, extensionRegistry); - } - }; + public Close parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Close(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - private void initFields() { - } + private void initFields() {} + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized != -1) + return isInitialized == 1; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; size += getUnknownFields().getSerializedSize(); @@ -129,6 +137,7 @@ public final class ListenerRegistrationMessages { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { @@ -140,47 +149,54 @@ public final class ListenerRegistrationMessages { throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -188,12 +204,22 @@ public final class ListenerRegistrationMessages { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close prototype) { + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( @@ -201,38 +227,41 @@ public final class ListenerRegistrationMessages { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.opendaylight.controller.mdsal.Close} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + implements + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_Close_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_Close_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close.class, org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close.Builder.class); + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close.class, + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close.Builder.class); } - // Construct using org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close.newBuilder() + // Construct using + // org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -246,17 +275,18 @@ public final class ListenerRegistrationMessages { return create().mergeFrom(buildPartial()); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_Close_descriptor; } public org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close getDefaultInstanceForType() { - return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close.getDefaultInstance(); + return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close + .getDefaultInstance(); } public org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close build() { - org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close result = buildPartial(); + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -264,22 +294,27 @@ public final class ListenerRegistrationMessages { } public org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close buildPartial() { - org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close result = new org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close(this); + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close result = + new org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close( + this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close) { - return mergeFrom((org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close)other); + return mergeFrom((org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close other) { - if (other == org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close.getDefaultInstance()) return this; + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close other) { + if (other == org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close + .getDefaultInstance()) + return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -288,15 +323,17 @@ public final class ListenerRegistrationMessages { return true; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parsedMessage = null; + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close) e.getUnfinishedMessage(); + parsedMessage = + (org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.Close) e + .getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -317,23 +354,27 @@ public final class ListenerRegistrationMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.Close) } - public interface CloseReplyOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface CloseReplyOrBuilder extends + com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code org.opendaylight.controller.mdsal.CloseReply} */ public static final class CloseReply extends - com.google.protobuf.GeneratedMessage - implements CloseReplyOrBuilder { + com.google.protobuf.GeneratedMessage implements CloseReplyOrBuilder { // Use CloseReply.newBuilder() to construct. private CloseReply(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private CloseReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private CloseReply(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final CloseReply defaultInstance; + public static CloseReply getDefaultInstance() { return defaultInstance; } @@ -343,13 +384,13 @@ public final class ListenerRegistrationMessages { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CloseReply( - com.google.protobuf.CodedInputStream input, + + private CloseReply(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); @@ -364,8 +405,8 @@ public final class ListenerRegistrationMessages { done = true; break; default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { done = true; } break; @@ -382,54 +423,58 @@ public final class ListenerRegistrationMessages { makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_CloseReply_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_CloseReply_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply.class, org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply.Builder.class); + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply.class, + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public CloseReply parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CloseReply(input, extensionRegistry); - } - }; + public CloseReply parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CloseReply(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - private void initFields() { - } + private void initFields() {} + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized != -1) + return isInitialized == 1; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; size += getUnknownFields().getSerializedSize(); @@ -438,6 +483,7 @@ public final class ListenerRegistrationMessages { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { @@ -449,47 +495,54 @@ public final class ListenerRegistrationMessages { throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -497,12 +550,22 @@ public final class ListenerRegistrationMessages { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply prototype) { + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( @@ -510,38 +573,41 @@ public final class ListenerRegistrationMessages { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.opendaylight.controller.mdsal.CloseReply} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReplyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + implements + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReplyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_CloseReply_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_CloseReply_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply.class, org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply.Builder.class); + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply.class, + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply.Builder.class); } - // Construct using org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply.newBuilder() + // Construct using + // org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -555,17 +621,18 @@ public final class ListenerRegistrationMessages { return create().mergeFrom(buildPartial()); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.internal_static_org_opendaylight_controller_mdsal_CloseReply_descriptor; } public org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply getDefaultInstanceForType() { - return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply.getDefaultInstance(); + return org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply + .getDefaultInstance(); } public org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply build() { - org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply result = buildPartial(); + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -573,22 +640,27 @@ public final class ListenerRegistrationMessages { } public org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply buildPartial() { - org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply result = new org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply(this); + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply result = + new org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply( + this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply) { - return mergeFrom((org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply)other); + return mergeFrom((org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply other) { - if (other == org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply.getDefaultInstance()) return this; + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply other) { + if (other == org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply + .getDefaultInstance()) + return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -597,15 +669,17 @@ public final class ListenerRegistrationMessages { return true; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parsedMessage = null; + org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply) e.getUnfinishedMessage(); + parsedMessage = + (org.opendaylight.controller.cluster.datastore.registration.ListenerRegistrationMessages.CloseReply) e + .getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -626,55 +700,46 @@ public final class ListenerRegistrationMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CloseReply) } - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_Close_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_Close_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CloseReply_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CloseReply_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_Close_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_Close_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_CloseReply_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_CloseReply_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - java.lang.String[] descriptorData = { - "\n\032ListenerRegistration.proto\022!org.openda" + - "ylight.controller.mdsal\"\007\n\005Close\"\014\n\nClos" + - "eReplyBZ\n:org.opendaylight.controller.cl" + - "uster.datastore.registrationB\034ListenerRe" + - "gistrationMessages" - }; + java.lang.String[] descriptorData = + {"\n\032ListenerRegistration.proto\022!org.openda" + + "ylight.controller.mdsal\"\007\n\005Close\"\014\n\nClos" + + "eReplyBZ\n:org.opendaylight.controller.cl" + + "uster.datastore.registrationB\034ListenerRe" + + "gistrationMessages"}; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_org_opendaylight_controller_mdsal_Close_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_opendaylight_controller_mdsal_Close_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_Close_descriptor, - new java.lang.String[] { }); - internal_static_org_opendaylight_controller_mdsal_CloseReply_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_org_opendaylight_controller_mdsal_CloseReply_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CloseReply_descriptor, - new java.lang.String[] { }); - return null; - } - }; + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_org_opendaylight_controller_mdsal_Close_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_opendaylight_controller_mdsal_Close_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_Close_descriptor, + new java.lang.String[] {}); + internal_static_org_opendaylight_controller_mdsal_CloseReply_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_org_opendaylight_controller_mdsal_CloseReply_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_CloseReply_descriptor, + new java.lang.String[] {}); + return null; + } + }; com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[]{}, assigner); } // @@protoc_insertion_point(outer_class_scope) diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/shard/ShardManagerMessages.java b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/shard/ShardManagerMessages.java index a8f1bf0373..3613923439 100644 --- a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/shard/ShardManagerMessages.java +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/shard/ShardManagerMessages.java @@ -1,45 +1,51 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! +// Generated by the protocol buffer compiler. DO NOT EDIT! // source: ShardManager.proto package org.opendaylight.controller.cluster.datastore.shard; public final class ShardManagerMessages { private ShardManagerMessages() {} + public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - public interface FindPrimaryOrBuilder - extends com.google.protobuf.MessageOrBuilder { + com.google.protobuf.ExtensionRegistry registry) {} + + public interface FindPrimaryOrBuilder extends + com.google.protobuf.MessageOrBuilder { // required string shardName = 1; /** * required string shardName = 1; */ boolean hasShardName(); + /** * required string shardName = 1; */ java.lang.String getShardName(); + /** * required string shardName = 1; */ - com.google.protobuf.ByteString - getShardNameBytes(); + com.google.protobuf.ByteString getShardNameBytes(); } /** * Protobuf type {@code org.opendaylight.controller.mdsal.FindPrimary} */ public static final class FindPrimary extends - com.google.protobuf.GeneratedMessage - implements FindPrimaryOrBuilder { + com.google.protobuf.GeneratedMessage implements FindPrimaryOrBuilder { // Use FindPrimary.newBuilder() to construct. private FindPrimary(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private FindPrimary(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private FindPrimary(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final FindPrimary defaultInstance; + public static FindPrimary getDefaultInstance() { return defaultInstance; } @@ -49,13 +55,13 @@ public final class ShardManagerMessages { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FindPrimary( - com.google.protobuf.CodedInputStream input, + + private FindPrimary(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); @@ -71,8 +77,8 @@ public final class ShardManagerMessages { done = true; break; default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { done = true; } break; @@ -94,27 +100,27 @@ public final class ShardManagerMessages { makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_FindPrimary_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_FindPrimary_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary.class, org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary.Builder.class); + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary.class, + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public FindPrimary parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FindPrimary(input, extensionRegistry); - } - }; + public FindPrimary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FindPrimary(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { @@ -125,12 +131,14 @@ public final class ShardManagerMessages { // required string shardName = 1; public static final int SHARDNAME_FIELD_NUMBER = 1; private java.lang.Object shardName_; + /** * required string shardName = 1; */ public boolean hasShardName() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * required string shardName = 1; */ @@ -148,16 +156,15 @@ public final class ShardManagerMessages { return s; } } + /** * required string shardName = 1; */ - public com.google.protobuf.ByteString - getShardNameBytes() { + public com.google.protobuf.ByteString getShardNameBytes() { java.lang.Object ref = shardName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); shardName_ = b; return b; } else { @@ -168,10 +175,13 @@ public final class ShardManagerMessages { private void initFields() { shardName_ = ""; } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized != -1) + return isInitialized == 1; if (!hasShardName()) { memoizedIsInitialized = 0; @@ -182,7 +192,7 @@ public final class ShardManagerMessages { } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getShardNameBytes()); @@ -191,14 +201,17 @@ public final class ShardManagerMessages { } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getShardNameBytes()); + size += + com.google.protobuf.CodedOutputStream.computeBytesSize(1, + getShardNameBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -206,6 +219,7 @@ public final class ShardManagerMessages { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { @@ -217,47 +231,54 @@ public final class ShardManagerMessages { throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary parseFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary parseFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -265,12 +286,22 @@ public final class ShardManagerMessages { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary prototype) { + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( @@ -278,38 +309,41 @@ public final class ShardManagerMessages { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.opendaylight.controller.mdsal.FindPrimary} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimaryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + implements + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_FindPrimary_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_FindPrimary_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary.class, org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary.Builder.class); + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary.class, + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary.Builder.class); } - // Construct using org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary.newBuilder() + // Construct using + // org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -325,17 +359,18 @@ public final class ShardManagerMessages { return create().mergeFrom(buildPartial()); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_FindPrimary_descriptor; } public org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary getDefaultInstanceForType() { - return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary.getDefaultInstance(); + return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary + .getDefaultInstance(); } public org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary build() { - org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary result = buildPartial(); + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -343,7 +378,9 @@ public final class ShardManagerMessages { } public org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary buildPartial() { - org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary result = new org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary(this); + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary result = + new org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary( + this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -357,15 +394,18 @@ public final class ShardManagerMessages { public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary) { - return mergeFrom((org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary)other); + return mergeFrom((org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary other) { - if (other == org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary.getDefaultInstance()) return this; + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary other) { + if (other == org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary + .getDefaultInstance()) + return this; if (other.hasShardName()) { bitField0_ |= 0x00000001; shardName_ = other.shardName_; @@ -383,15 +423,17 @@ public final class ShardManagerMessages { return true; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary parsedMessage = null; + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary) e.getUnfinishedMessage(); + parsedMessage = + (org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.FindPrimary) e + .getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -400,59 +442,63 @@ public final class ShardManagerMessages { } return this; } + private int bitField0_; // required string shardName = 1; private java.lang.Object shardName_ = ""; + /** * required string shardName = 1; */ public boolean hasShardName() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * required string shardName = 1; */ public java.lang.String getShardName() { java.lang.Object ref = shardName_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); + java.lang.String s = + ((com.google.protobuf.ByteString) ref).toStringUtf8(); shardName_ = s; return s; } else { return (java.lang.String) ref; } } + /** * required string shardName = 1; */ - public com.google.protobuf.ByteString - getShardNameBytes() { + public com.google.protobuf.ByteString getShardNameBytes() { java.lang.Object ref = shardName_; if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString + .copyFromUtf8((java.lang.String) ref); shardName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * required string shardName = 1; */ - public Builder setShardName( - java.lang.String value) { + public Builder setShardName(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; shardName_ = value; onChanged(); return this; } + /** * required string shardName = 1; */ @@ -462,15 +508,15 @@ public final class ShardManagerMessages { onChanged(); return this; } + /** * required string shardName = 1; */ - public Builder setShardNameBytes( - com.google.protobuf.ByteString value) { + public Builder setShardNameBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; shardName_ = value; onChanged(); return this; @@ -487,23 +533,27 @@ public final class ShardManagerMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.FindPrimary) } - public interface PrimaryFoundOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface PrimaryFoundOrBuilder extends + com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code org.opendaylight.controller.mdsal.PrimaryFound} */ public static final class PrimaryFound extends - com.google.protobuf.GeneratedMessage - implements PrimaryFoundOrBuilder { + com.google.protobuf.GeneratedMessage implements PrimaryFoundOrBuilder { // Use PrimaryFound.newBuilder() to construct. private PrimaryFound(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private PrimaryFound(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private PrimaryFound(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final PrimaryFound defaultInstance; + public static PrimaryFound getDefaultInstance() { return defaultInstance; } @@ -513,13 +563,13 @@ public final class ShardManagerMessages { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PrimaryFound( - com.google.protobuf.CodedInputStream input, + + private PrimaryFound(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); @@ -534,8 +584,8 @@ public final class ShardManagerMessages { done = true; break; default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { done = true; } break; @@ -552,54 +602,58 @@ public final class ShardManagerMessages { makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryFound_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryFound_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound.class, org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound.Builder.class); + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound.class, + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public PrimaryFound parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PrimaryFound(input, extensionRegistry); - } - }; + public PrimaryFound parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrimaryFound(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - private void initFields() { - } + private void initFields() {} + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized != -1) + return isInitialized == 1; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; size += getUnknownFields().getSerializedSize(); @@ -608,6 +662,7 @@ public final class ShardManagerMessages { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { @@ -619,47 +674,54 @@ public final class ShardManagerMessages { throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound parseFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound parseFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -667,12 +729,22 @@ public final class ShardManagerMessages { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound prototype) { + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( @@ -680,38 +752,41 @@ public final class ShardManagerMessages { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.opendaylight.controller.mdsal.PrimaryFound} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFoundOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + implements + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFoundOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryFound_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryFound_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound.class, org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound.Builder.class); + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound.class, + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound.Builder.class); } - // Construct using org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound.newBuilder() + // Construct using + // org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -725,17 +800,18 @@ public final class ShardManagerMessages { return create().mergeFrom(buildPartial()); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryFound_descriptor; } public org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound getDefaultInstanceForType() { - return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound.getDefaultInstance(); + return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound + .getDefaultInstance(); } public org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound build() { - org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound result = buildPartial(); + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -743,22 +819,27 @@ public final class ShardManagerMessages { } public org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound buildPartial() { - org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound result = new org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound(this); + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound result = + new org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound( + this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound) { - return mergeFrom((org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound)other); + return mergeFrom((org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound other) { - if (other == org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound.getDefaultInstance()) return this; + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound other) { + if (other == org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound + .getDefaultInstance()) + return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -767,15 +848,17 @@ public final class ShardManagerMessages { return true; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound parsedMessage = null; + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound) e.getUnfinishedMessage(); + parsedMessage = + (org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryFound) e + .getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -796,23 +879,28 @@ public final class ShardManagerMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.PrimaryFound) } - public interface PrimaryNotFoundOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface PrimaryNotFoundOrBuilder extends + com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code org.opendaylight.controller.mdsal.PrimaryNotFound} */ public static final class PrimaryNotFound extends - com.google.protobuf.GeneratedMessage - implements PrimaryNotFoundOrBuilder { + com.google.protobuf.GeneratedMessage implements PrimaryNotFoundOrBuilder { // Use PrimaryNotFound.newBuilder() to construct. - private PrimaryNotFound(com.google.protobuf.GeneratedMessage.Builder builder) { + private PrimaryNotFound( + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private PrimaryNotFound(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private PrimaryNotFound(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final PrimaryNotFound defaultInstance; + public static PrimaryNotFound getDefaultInstance() { return defaultInstance; } @@ -822,13 +910,13 @@ public final class ShardManagerMessages { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PrimaryNotFound( - com.google.protobuf.CodedInputStream input, + + private PrimaryNotFound(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); @@ -843,8 +931,8 @@ public final class ShardManagerMessages { done = true; break; default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { done = true; } break; @@ -861,54 +949,58 @@ public final class ShardManagerMessages { makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound.class, org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound.Builder.class); + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound.class, + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public PrimaryNotFound parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PrimaryNotFound(input, extensionRegistry); - } - }; + public PrimaryNotFound parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrimaryNotFound(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - private void initFields() { - } + private void initFields() {} + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized != -1) + return isInitialized == 1; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; size += getUnknownFields().getSerializedSize(); @@ -917,6 +1009,7 @@ public final class ShardManagerMessages { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { @@ -928,47 +1021,54 @@ public final class ShardManagerMessages { throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound parseFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound parseFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -976,12 +1076,22 @@ public final class ShardManagerMessages { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound prototype) { + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( @@ -989,38 +1099,41 @@ public final class ShardManagerMessages { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.opendaylight.controller.mdsal.PrimaryNotFound} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFoundOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + implements + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFoundOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound.class, org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound.Builder.class); + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound.class, + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound.Builder.class); } - // Construct using org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound.newBuilder() + // Construct using + // org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -1034,17 +1147,18 @@ public final class ShardManagerMessages { return create().mergeFrom(buildPartial()); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_descriptor; } public org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound getDefaultInstanceForType() { - return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound.getDefaultInstance(); + return org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound + .getDefaultInstance(); } public org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound build() { - org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound result = buildPartial(); + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -1052,22 +1166,27 @@ public final class ShardManagerMessages { } public org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound buildPartial() { - org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound result = new org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound(this); + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound result = + new org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound( + this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound) { - return mergeFrom((org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound)other); + return mergeFrom((org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound other) { - if (other == org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound.getDefaultInstance()) return this; + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound other) { + if (other == org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound + .getDefaultInstance()) + return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -1076,15 +1195,17 @@ public final class ShardManagerMessages { return true; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound parsedMessage = null; + org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound) e.getUnfinishedMessage(); + parsedMessage = + (org.opendaylight.controller.cluster.datastore.shard.ShardManagerMessages.PrimaryNotFound) e + .getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -1105,67 +1226,54 @@ public final class ShardManagerMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.PrimaryNotFound) } - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_FindPrimary_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_FindPrimary_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_PrimaryFound_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_PrimaryFound_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_FindPrimary_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_FindPrimary_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_PrimaryFound_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_PrimaryFound_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - java.lang.String[] descriptorData = { - "\n\022ShardManager.proto\022!org.opendaylight.c" + - "ontroller.mdsal\" \n\013FindPrimary\022\021\n\tshardN" + - "ame\030\001 \002(\t\"\016\n\014PrimaryFound\"\021\n\017PrimaryNotF" + - "oundBK\n3org.opendaylight.controller.clus" + - "ter.datastore.shardB\024ShardManagerMessage" + - "s" - }; + java.lang.String[] descriptorData = + {"\n\022ShardManager.proto\022!org.opendaylight.c" + + "ontroller.mdsal\" \n\013FindPrimary\022\021\n\tshardN" + + "ame\030\001 \002(\t\"\016\n\014PrimaryFound\"\021\n\017PrimaryNotF" + + "oundBK\n3org.opendaylight.controller.clus" + + "ter.datastore.shardB\024ShardManagerMessage" + "s"}; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_org_opendaylight_controller_mdsal_FindPrimary_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_opendaylight_controller_mdsal_FindPrimary_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_FindPrimary_descriptor, - new java.lang.String[] { "ShardName", }); - internal_static_org_opendaylight_controller_mdsal_PrimaryFound_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_org_opendaylight_controller_mdsal_PrimaryFound_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_PrimaryFound_descriptor, - new java.lang.String[] { }); - internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_descriptor, - new java.lang.String[] { }); - return null; - } - }; + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_org_opendaylight_controller_mdsal_FindPrimary_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_opendaylight_controller_mdsal_FindPrimary_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_FindPrimary_descriptor, + new java.lang.String[] {"ShardName",}); + internal_static_org_opendaylight_controller_mdsal_PrimaryFound_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_org_opendaylight_controller_mdsal_PrimaryFound_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_PrimaryFound_descriptor, + new java.lang.String[] {}); + internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_descriptor, + new java.lang.String[] {}); + return null; + } + }; com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[]{}, assigner); } // @@protoc_insertion_point(outer_class_scope) diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/transaction/ShardTransactionChainMessages.java b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/transaction/ShardTransactionChainMessages.java index 5de32c8a66..08ddf38a44 100644 --- a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/transaction/ShardTransactionChainMessages.java +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/transaction/ShardTransactionChainMessages.java @@ -1,30 +1,37 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: ShardTransactionChainMessages.proto +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ShardTransactionChain.proto package org.opendaylight.controller.cluster.datastore.transaction; public final class ShardTransactionChainMessages { private ShardTransactionChainMessages() {} + public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - public interface CloseTransactionChainOrBuilder - extends com.google.protobuf.MessageOrBuilder { + com.google.protobuf.ExtensionRegistry registry) {} + + public interface CloseTransactionChainOrBuilder extends + com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransactionChain} */ public static final class CloseTransactionChain extends - com.google.protobuf.GeneratedMessage - implements CloseTransactionChainOrBuilder { + com.google.protobuf.GeneratedMessage implements + CloseTransactionChainOrBuilder { // Use CloseTransactionChain.newBuilder() to construct. - private CloseTransactionChain(com.google.protobuf.GeneratedMessage.Builder builder) { + private CloseTransactionChain( + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private CloseTransactionChain(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private CloseTransactionChain(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final CloseTransactionChain defaultInstance; + public static CloseTransactionChain getDefaultInstance() { return defaultInstance; } @@ -34,13 +41,13 @@ public final class ShardTransactionChainMessages { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CloseTransactionChain( - com.google.protobuf.CodedInputStream input, + + private CloseTransactionChain(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); @@ -55,8 +62,8 @@ public final class ShardTransactionChainMessages { done = true; break; default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { done = true; } break; @@ -73,54 +80,58 @@ public final class ShardTransactionChainMessages { makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public CloseTransactionChain parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CloseTransactionChain(input, extensionRegistry); - } - }; + public CloseTransactionChain parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CloseTransactionChain(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - private void initFields() { - } + private void initFields() {} + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized != -1) + return isInitialized == 1; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; size += getUnknownFields().getSerializedSize(); @@ -129,6 +140,7 @@ public final class ShardTransactionChainMessages { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { @@ -140,47 +152,54 @@ public final class ShardTransactionChainMessages { throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -188,12 +207,22 @@ public final class ShardTransactionChainMessages { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain prototype) { + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( @@ -201,38 +230,41 @@ public final class ShardTransactionChainMessages { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransactionChain} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + implements + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain.Builder.class); } - // Construct using org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain.newBuilder() + // Construct using + // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -246,17 +278,18 @@ public final class ShardTransactionChainMessages { return create().mergeFrom(buildPartial()); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor; } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain getDefaultInstanceForType() { - return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain.getDefaultInstance(); + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain + .getDefaultInstance(); } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain build() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain result = buildPartial(); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -264,22 +297,27 @@ public final class ShardTransactionChainMessages { } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain buildPartial() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain result = new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain(this); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain result = + new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain( + this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain) { - return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain)other); + return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain other) { - if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain.getDefaultInstance()) return this; + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain other) { + if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain + .getDefaultInstance()) + return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -288,15 +326,17 @@ public final class ShardTransactionChainMessages { return true; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parsedMessage = null; + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain) e.getUnfinishedMessage(); + parsedMessage = + (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChain) e + .getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -317,23 +357,29 @@ public final class ShardTransactionChainMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CloseTransactionChain) } - public interface CloseTransactionChainReplyOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface CloseTransactionChainReplyOrBuilder extends + com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransactionChainReply} */ public static final class CloseTransactionChainReply extends - com.google.protobuf.GeneratedMessage - implements CloseTransactionChainReplyOrBuilder { + com.google.protobuf.GeneratedMessage implements + CloseTransactionChainReplyOrBuilder { // Use CloseTransactionChainReply.newBuilder() to construct. - private CloseTransactionChainReply(com.google.protobuf.GeneratedMessage.Builder builder) { + private CloseTransactionChainReply( + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private CloseTransactionChainReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private CloseTransactionChainReply(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final CloseTransactionChainReply defaultInstance; + public static CloseTransactionChainReply getDefaultInstance() { return defaultInstance; } @@ -343,11 +389,12 @@ public final class ShardTransactionChainMessages { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } + private CloseTransactionChainReply( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -364,8 +411,8 @@ public final class ShardTransactionChainMessages { done = true; break; default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { done = true; } break; @@ -382,54 +429,58 @@ public final class ShardTransactionChainMessages { makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public CloseTransactionChainReply parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CloseTransactionChainReply(input, extensionRegistry); - } - }; + public CloseTransactionChainReply parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CloseTransactionChainReply(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - private void initFields() { - } + private void initFields() {} + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized != -1) + return isInitialized == 1; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; size += getUnknownFields().getSerializedSize(); @@ -438,6 +489,7 @@ public final class ShardTransactionChainMessages { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { @@ -449,47 +501,54 @@ public final class ShardTransactionChainMessages { throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -497,12 +556,22 @@ public final class ShardTransactionChainMessages { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply prototype) { + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( @@ -510,38 +579,41 @@ public final class ShardTransactionChainMessages { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransactionChainReply} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReplyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + implements + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReplyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.Builder.class); } - // Construct using org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.newBuilder() + // Construct using + // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -555,17 +627,18 @@ public final class ShardTransactionChainMessages { return create().mergeFrom(buildPartial()); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor; } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply getDefaultInstanceForType() { - return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.getDefaultInstance(); + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply + .getDefaultInstance(); } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply build() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply result = buildPartial(); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -573,22 +646,27 @@ public final class ShardTransactionChainMessages { } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply buildPartial() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply result = new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply(this); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply result = + new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply( + this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply) { - return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply)other); + return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply other) { - if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.getDefaultInstance()) return this; + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply other) { + if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply + .getDefaultInstance()) + return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -597,15 +675,17 @@ public final class ShardTransactionChainMessages { return true; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parsedMessage = null; + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply) e.getUnfinishedMessage(); + parsedMessage = + (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CloseTransactionChainReply) e + .getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -626,23 +706,29 @@ public final class ShardTransactionChainMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CloseTransactionChainReply) } - public interface CreateTransactionChainOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface CreateTransactionChainOrBuilder extends + com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code org.opendaylight.controller.mdsal.CreateTransactionChain} */ public static final class CreateTransactionChain extends - com.google.protobuf.GeneratedMessage - implements CreateTransactionChainOrBuilder { + com.google.protobuf.GeneratedMessage implements + CreateTransactionChainOrBuilder { // Use CreateTransactionChain.newBuilder() to construct. - private CreateTransactionChain(com.google.protobuf.GeneratedMessage.Builder builder) { + private CreateTransactionChain( + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private CreateTransactionChain(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private CreateTransactionChain(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final CreateTransactionChain defaultInstance; + public static CreateTransactionChain getDefaultInstance() { return defaultInstance; } @@ -652,13 +738,13 @@ public final class ShardTransactionChainMessages { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateTransactionChain( - com.google.protobuf.CodedInputStream input, + + private CreateTransactionChain(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); @@ -673,8 +759,8 @@ public final class ShardTransactionChainMessages { done = true; break; default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { done = true; } break; @@ -691,54 +777,58 @@ public final class ShardTransactionChainMessages { makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public CreateTransactionChain parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateTransactionChain(input, extensionRegistry); - } - }; + public CreateTransactionChain parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateTransactionChain(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - private void initFields() { - } + private void initFields() {} + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized != -1) + return isInitialized == 1; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; size += getUnknownFields().getSerializedSize(); @@ -747,6 +837,7 @@ public final class ShardTransactionChainMessages { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { @@ -758,47 +849,54 @@ public final class ShardTransactionChainMessages { throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -806,12 +904,22 @@ public final class ShardTransactionChainMessages { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain prototype) { + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( @@ -819,38 +927,41 @@ public final class ShardTransactionChainMessages { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.opendaylight.controller.mdsal.CreateTransactionChain} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + implements + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain.Builder.class); } - // Construct using org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain.newBuilder() + // Construct using + // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -864,17 +975,18 @@ public final class ShardTransactionChainMessages { return create().mergeFrom(buildPartial()); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_descriptor; } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain getDefaultInstanceForType() { - return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain.getDefaultInstance(); + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain + .getDefaultInstance(); } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain build() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain result = buildPartial(); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -882,22 +994,27 @@ public final class ShardTransactionChainMessages { } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain buildPartial() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain result = new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain(this); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain result = + new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain( + this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain) { - return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain)other); + return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain other) { - if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain.getDefaultInstance()) return this; + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain other) { + if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain + .getDefaultInstance()) + return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -906,15 +1023,17 @@ public final class ShardTransactionChainMessages { return true; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parsedMessage = null; + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain) e.getUnfinishedMessage(); + parsedMessage = + (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChain) e + .getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -935,38 +1054,45 @@ public final class ShardTransactionChainMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CreateTransactionChain) } - public interface CreateTransactionChainReplyOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface CreateTransactionChainReplyOrBuilder extends + com.google.protobuf.MessageOrBuilder { // required string transactionChainPath = 1; /** * required string transactionChainPath = 1; */ boolean hasTransactionChainPath(); + /** * required string transactionChainPath = 1; */ java.lang.String getTransactionChainPath(); + /** * required string transactionChainPath = 1; */ - com.google.protobuf.ByteString - getTransactionChainPathBytes(); + com.google.protobuf.ByteString getTransactionChainPathBytes(); } /** * Protobuf type {@code org.opendaylight.controller.mdsal.CreateTransactionChainReply} */ public static final class CreateTransactionChainReply extends - com.google.protobuf.GeneratedMessage - implements CreateTransactionChainReplyOrBuilder { + com.google.protobuf.GeneratedMessage implements + CreateTransactionChainReplyOrBuilder { // Use CreateTransactionChainReply.newBuilder() to construct. - private CreateTransactionChainReply(com.google.protobuf.GeneratedMessage.Builder builder) { + private CreateTransactionChainReply( + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private CreateTransactionChainReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private CreateTransactionChainReply(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final CreateTransactionChainReply defaultInstance; + public static CreateTransactionChainReply getDefaultInstance() { return defaultInstance; } @@ -976,11 +1102,12 @@ public final class ShardTransactionChainMessages { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } + private CreateTransactionChainReply( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -998,8 +1125,8 @@ public final class ShardTransactionChainMessages { done = true; break; default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { done = true; } break; @@ -1021,27 +1148,27 @@ public final class ShardTransactionChainMessages { makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public CreateTransactionChainReply parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateTransactionChainReply(input, extensionRegistry); - } - }; + public CreateTransactionChainReply parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateTransactionChainReply(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { @@ -1052,12 +1179,14 @@ public final class ShardTransactionChainMessages { // required string transactionChainPath = 1; public static final int TRANSACTIONCHAINPATH_FIELD_NUMBER = 1; private java.lang.Object transactionChainPath_; + /** * required string transactionChainPath = 1; */ public boolean hasTransactionChainPath() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * required string transactionChainPath = 1; */ @@ -1075,16 +1204,15 @@ public final class ShardTransactionChainMessages { return s; } } + /** * required string transactionChainPath = 1; */ - public com.google.protobuf.ByteString - getTransactionChainPathBytes() { + public com.google.protobuf.ByteString getTransactionChainPathBytes() { java.lang.Object ref = transactionChainPath_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); transactionChainPath_ = b; return b; } else { @@ -1095,10 +1223,13 @@ public final class ShardTransactionChainMessages { private void initFields() { transactionChainPath_ = ""; } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized != -1) + return isInitialized == 1; if (!hasTransactionChainPath()) { memoizedIsInitialized = 0; @@ -1109,7 +1240,7 @@ public final class ShardTransactionChainMessages { } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getTransactionChainPathBytes()); @@ -1118,14 +1249,17 @@ public final class ShardTransactionChainMessages { } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTransactionChainPathBytes()); + size += + com.google.protobuf.CodedOutputStream.computeBytesSize(1, + getTransactionChainPathBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -1133,6 +1267,7 @@ public final class ShardTransactionChainMessages { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { @@ -1144,47 +1279,54 @@ public final class ShardTransactionChainMessages { throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1192,12 +1334,22 @@ public final class ShardTransactionChainMessages { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply prototype) { + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( @@ -1205,38 +1357,41 @@ public final class ShardTransactionChainMessages { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.opendaylight.controller.mdsal.CreateTransactionChainReply} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReplyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + implements + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReplyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply.Builder.class); } - // Construct using org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply.newBuilder() + // Construct using + // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -1252,17 +1407,18 @@ public final class ShardTransactionChainMessages { return create().mergeFrom(buildPartial()); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_descriptor; } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply getDefaultInstanceForType() { - return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply.getDefaultInstance(); + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply + .getDefaultInstance(); } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply build() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply result = buildPartial(); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -1270,7 +1426,9 @@ public final class ShardTransactionChainMessages { } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply buildPartial() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply result = new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply(this); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply result = + new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply( + this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -1284,15 +1442,18 @@ public final class ShardTransactionChainMessages { public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply) { - return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply)other); + return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply other) { - if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply.getDefaultInstance()) return this; + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply other) { + if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply + .getDefaultInstance()) + return this; if (other.hasTransactionChainPath()) { bitField0_ |= 0x00000001; transactionChainPath_ = other.transactionChainPath_; @@ -1303,21 +1464,24 @@ public final class ShardTransactionChainMessages { } public final boolean isInitialized() { - if (!hasTransactionChainPath()){ + if (!hasTransactionChainPath()) { + return false; } return true; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parsedMessage = null; + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply) e.getUnfinishedMessage(); + parsedMessage = + (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionChainMessages.CreateTransactionChainReply) e + .getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -1326,59 +1490,63 @@ public final class ShardTransactionChainMessages { } return this; } + private int bitField0_; // required string transactionChainPath = 1; private java.lang.Object transactionChainPath_ = ""; + /** * required string transactionChainPath = 1; */ public boolean hasTransactionChainPath() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * required string transactionChainPath = 1; */ public java.lang.String getTransactionChainPath() { java.lang.Object ref = transactionChainPath_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); + java.lang.String s = + ((com.google.protobuf.ByteString) ref).toStringUtf8(); transactionChainPath_ = s; return s; } else { return (java.lang.String) ref; } } + /** * required string transactionChainPath = 1; */ - public com.google.protobuf.ByteString - getTransactionChainPathBytes() { + public com.google.protobuf.ByteString getTransactionChainPathBytes() { java.lang.Object ref = transactionChainPath_; if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString + .copyFromUtf8((java.lang.String) ref); transactionChainPath_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * required string transactionChainPath = 1; */ - public Builder setTransactionChainPath( - java.lang.String value) { + public Builder setTransactionChainPath(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; transactionChainPath_ = value; onChanged(); return this; } + /** * required string transactionChainPath = 1; */ @@ -1388,15 +1556,16 @@ public final class ShardTransactionChainMessages { onChanged(); return this; } + /** * required string transactionChainPath = 1; */ public Builder setTransactionChainPathBytes( com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; transactionChainPath_ = value; onChanged(); return this; @@ -1413,80 +1582,65 @@ public final class ShardTransactionChainMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CreateTransactionChainReply) } - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - java.lang.String[] descriptorData = { - "\n#ShardTransactionChainMessages.proto\022!o" + - "rg.opendaylight.controller.mdsal\"\027\n\025Clos" + - "eTransactionChain\"\034\n\032CloseTransactionCha" + - "inReply\"\030\n\026CreateTransactionChain\";\n\033Cre" + - "ateTransactionChainReply\022\034\n\024transactionC" + - "hainPath\030\001 \002(\tBZ\n9org.opendaylight.contr" + - "oller.cluster.datastore.transactionB\035Sha" + - "rdTransactionChainMessages" - }; + java.lang.String[] descriptorData = + {"\n\033ShardTransactionChain.proto\022!org.opend" + + "aylight.controller.mdsal\"\027\n\025CloseTransac" + + "tionChain\"\034\n\032CloseTransactionChainReply\"" + + "\030\n\026CreateTransactionChain\";\n\033CreateTrans" + + "actionChainReply\022\034\n\024transactionChainPath" + + "\030\001 \002(\tBZ\n9org.opendaylight.controller.cl" + + "uster.datastore.transactionB\035ShardTransa" + + "ctionChainMessages"}; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor, - new java.lang.String[] { }); - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor, - new java.lang.String[] { }); - internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_descriptor, - new java.lang.String[] { }); - internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_descriptor, - new java.lang.String[] { "TransactionChainPath", }); - return null; - } - }; + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor, + new java.lang.String[] {}); + internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor, + new java.lang.String[] {}); + internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_CreateTransactionChain_descriptor, + new java.lang.String[] {}); + internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_CreateTransactionChainReply_descriptor, + new java.lang.String[] {"TransactionChainPath",}); + return null; + } + }; com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[]{}, assigner); } // @@protoc_insertion_point(outer_class_scope) diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/transaction/ShardTransactionMessages.java b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/transaction/ShardTransactionMessages.java index 3a226db3bc..2ade1d6a60 100644 --- a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/transaction/ShardTransactionMessages.java +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/transaction/ShardTransactionMessages.java @@ -1,30 +1,36 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: ShardTransactionMessages.proto +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ShardTransaction.proto package org.opendaylight.controller.cluster.datastore.transaction; public final class ShardTransactionMessages { private ShardTransactionMessages() {} + public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - public interface CloseTransactionOrBuilder - extends com.google.protobuf.MessageOrBuilder { + com.google.protobuf.ExtensionRegistry registry) {} + + public interface CloseTransactionOrBuilder extends + com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransaction} */ public static final class CloseTransaction extends - com.google.protobuf.GeneratedMessage - implements CloseTransactionOrBuilder { + com.google.protobuf.GeneratedMessage implements CloseTransactionOrBuilder { // Use CloseTransaction.newBuilder() to construct. - private CloseTransaction(com.google.protobuf.GeneratedMessage.Builder builder) { + private CloseTransaction( + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private CloseTransaction(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private CloseTransaction(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final CloseTransaction defaultInstance; + public static CloseTransaction getDefaultInstance() { return defaultInstance; } @@ -34,13 +40,13 @@ public final class ShardTransactionMessages { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CloseTransaction( - com.google.protobuf.CodedInputStream input, + + private CloseTransaction(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); @@ -55,8 +61,8 @@ public final class ShardTransactionMessages { done = true; break; default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { done = true; } break; @@ -73,54 +79,58 @@ public final class ShardTransactionMessages { makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransaction_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransaction_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public CloseTransaction parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CloseTransaction(input, extensionRegistry); - } - }; + public CloseTransaction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CloseTransaction(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - private void initFields() { - } + private void initFields() {} + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized != -1) + return isInitialized == 1; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; size += getUnknownFields().getSerializedSize(); @@ -129,6 +139,7 @@ public final class ShardTransactionMessages { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { @@ -140,47 +151,54 @@ public final class ShardTransactionMessages { throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction parseFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction parseFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -188,12 +206,22 @@ public final class ShardTransactionMessages { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction prototype) { + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( @@ -201,38 +229,41 @@ public final class ShardTransactionMessages { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransaction} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + implements + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransaction_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransaction_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction.Builder.class); } - // Construct using org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction.newBuilder() + // Construct using + // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -246,17 +277,18 @@ public final class ShardTransactionMessages { return create().mergeFrom(buildPartial()); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransaction_descriptor; } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction getDefaultInstanceForType() { - return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction.getDefaultInstance(); + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction + .getDefaultInstance(); } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction build() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction result = buildPartial(); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -264,22 +296,27 @@ public final class ShardTransactionMessages { } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction buildPartial() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction result = new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction(this); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction result = + new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction( + this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction) { - return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction)other); + return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction other) { - if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction.getDefaultInstance()) return this; + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction other) { + if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction + .getDefaultInstance()) + return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -288,15 +325,17 @@ public final class ShardTransactionMessages { return true; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction parsedMessage = null; + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction) e.getUnfinishedMessage(); + parsedMessage = + (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransaction) e + .getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -317,23 +356,29 @@ public final class ShardTransactionMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CloseTransaction) } - public interface CloseTransactionReplyOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface CloseTransactionReplyOrBuilder extends + com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransactionReply} */ public static final class CloseTransactionReply extends - com.google.protobuf.GeneratedMessage - implements CloseTransactionReplyOrBuilder { + com.google.protobuf.GeneratedMessage implements + CloseTransactionReplyOrBuilder { // Use CloseTransactionReply.newBuilder() to construct. - private CloseTransactionReply(com.google.protobuf.GeneratedMessage.Builder builder) { + private CloseTransactionReply( + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private CloseTransactionReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private CloseTransactionReply(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final CloseTransactionReply defaultInstance; + public static CloseTransactionReply getDefaultInstance() { return defaultInstance; } @@ -343,13 +388,13 @@ public final class ShardTransactionMessages { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CloseTransactionReply( - com.google.protobuf.CodedInputStream input, + + private CloseTransactionReply(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); @@ -364,8 +409,8 @@ public final class ShardTransactionMessages { done = true; break; default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { done = true; } break; @@ -382,54 +427,58 @@ public final class ShardTransactionMessages { makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public CloseTransactionReply parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CloseTransactionReply(input, extensionRegistry); - } - }; + public CloseTransactionReply parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CloseTransactionReply(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - private void initFields() { - } + private void initFields() {} + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized != -1) + return isInitialized == 1; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; size += getUnknownFields().getSerializedSize(); @@ -438,6 +487,7 @@ public final class ShardTransactionMessages { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { @@ -449,47 +499,54 @@ public final class ShardTransactionMessages { throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply parseFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply parseFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -497,12 +554,22 @@ public final class ShardTransactionMessages { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply prototype) { + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( @@ -510,38 +577,41 @@ public final class ShardTransactionMessages { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransactionReply} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReplyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + implements + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReplyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply.Builder.class); } - // Construct using org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply.newBuilder() + // Construct using + // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -555,17 +625,18 @@ public final class ShardTransactionMessages { return create().mergeFrom(buildPartial()); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_descriptor; } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply getDefaultInstanceForType() { - return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply.getDefaultInstance(); + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply + .getDefaultInstance(); } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply build() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply result = buildPartial(); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -573,22 +644,27 @@ public final class ShardTransactionMessages { } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply buildPartial() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply result = new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply(this); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply result = + new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply( + this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply) { - return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply)other); + return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply other) { - if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply.getDefaultInstance()) return this; + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply other) { + if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply + .getDefaultInstance()) + return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -597,15 +673,17 @@ public final class ShardTransactionMessages { return true; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply parsedMessage = null; + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply) e.getUnfinishedMessage(); + parsedMessage = + (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CloseTransactionReply) e + .getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -626,23 +704,29 @@ public final class ShardTransactionMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CloseTransactionReply) } - public interface CreateTransactionOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface CreateTransactionOrBuilder extends + com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code org.opendaylight.controller.mdsal.CreateTransaction} */ public static final class CreateTransaction extends - com.google.protobuf.GeneratedMessage - implements CreateTransactionOrBuilder { + com.google.protobuf.GeneratedMessage implements + CreateTransactionOrBuilder { // Use CreateTransaction.newBuilder() to construct. - private CreateTransaction(com.google.protobuf.GeneratedMessage.Builder builder) { + private CreateTransaction( + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private CreateTransaction(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private CreateTransaction(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final CreateTransaction defaultInstance; + public static CreateTransaction getDefaultInstance() { return defaultInstance; } @@ -652,13 +736,13 @@ public final class ShardTransactionMessages { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateTransaction( - com.google.protobuf.CodedInputStream input, + + private CreateTransaction(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); @@ -673,8 +757,8 @@ public final class ShardTransactionMessages { done = true; break; default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { done = true; } break; @@ -691,54 +775,58 @@ public final class ShardTransactionMessages { makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransaction_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransaction_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public CreateTransaction parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateTransaction(input, extensionRegistry); - } - }; + public CreateTransaction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateTransaction(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - private void initFields() { - } + private void initFields() {} + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized != -1) + return isInitialized == 1; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; size += getUnknownFields().getSerializedSize(); @@ -747,6 +835,7 @@ public final class ShardTransactionMessages { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { @@ -758,47 +847,54 @@ public final class ShardTransactionMessages { throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction parseFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction parseFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -806,12 +902,22 @@ public final class ShardTransactionMessages { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction prototype) { + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( @@ -819,38 +925,41 @@ public final class ShardTransactionMessages { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.opendaylight.controller.mdsal.CreateTransaction} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + implements + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransaction_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransaction_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction.Builder.class); } - // Construct using org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction.newBuilder() + // Construct using + // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -864,17 +973,18 @@ public final class ShardTransactionMessages { return create().mergeFrom(buildPartial()); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransaction_descriptor; } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction getDefaultInstanceForType() { - return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction.getDefaultInstance(); + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction + .getDefaultInstance(); } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction build() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction result = buildPartial(); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -882,22 +992,27 @@ public final class ShardTransactionMessages { } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction buildPartial() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction result = new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction(this); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction result = + new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction( + this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction) { - return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction)other); + return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction other) { - if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction.getDefaultInstance()) return this; + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction other) { + if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction + .getDefaultInstance()) + return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -906,15 +1021,17 @@ public final class ShardTransactionMessages { return true; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction parsedMessage = null; + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction) e.getUnfinishedMessage(); + parsedMessage = + (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransaction) e + .getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -935,38 +1052,45 @@ public final class ShardTransactionMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CreateTransaction) } - public interface CreateTransactionReplyOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface CreateTransactionReplyOrBuilder extends + com.google.protobuf.MessageOrBuilder { // required string transactionPath = 1; /** * required string transactionPath = 1; */ boolean hasTransactionPath(); + /** * required string transactionPath = 1; */ java.lang.String getTransactionPath(); + /** * required string transactionPath = 1; */ - com.google.protobuf.ByteString - getTransactionPathBytes(); + com.google.protobuf.ByteString getTransactionPathBytes(); } /** * Protobuf type {@code org.opendaylight.controller.mdsal.CreateTransactionReply} */ public static final class CreateTransactionReply extends - com.google.protobuf.GeneratedMessage - implements CreateTransactionReplyOrBuilder { + com.google.protobuf.GeneratedMessage implements + CreateTransactionReplyOrBuilder { // Use CreateTransactionReply.newBuilder() to construct. - private CreateTransactionReply(com.google.protobuf.GeneratedMessage.Builder builder) { + private CreateTransactionReply( + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private CreateTransactionReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private CreateTransactionReply(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final CreateTransactionReply defaultInstance; + public static CreateTransactionReply getDefaultInstance() { return defaultInstance; } @@ -976,13 +1100,13 @@ public final class ShardTransactionMessages { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateTransactionReply( - com.google.protobuf.CodedInputStream input, + + private CreateTransactionReply(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); @@ -998,8 +1122,8 @@ public final class ShardTransactionMessages { done = true; break; default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { done = true; } break; @@ -1021,27 +1145,27 @@ public final class ShardTransactionMessages { makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public CreateTransactionReply parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateTransactionReply(input, extensionRegistry); - } - }; + public CreateTransactionReply parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateTransactionReply(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { @@ -1052,12 +1176,14 @@ public final class ShardTransactionMessages { // required string transactionPath = 1; public static final int TRANSACTIONPATH_FIELD_NUMBER = 1; private java.lang.Object transactionPath_; + /** * required string transactionPath = 1; */ public boolean hasTransactionPath() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * required string transactionPath = 1; */ @@ -1075,16 +1201,15 @@ public final class ShardTransactionMessages { return s; } } + /** * required string transactionPath = 1; */ - public com.google.protobuf.ByteString - getTransactionPathBytes() { + public com.google.protobuf.ByteString getTransactionPathBytes() { java.lang.Object ref = transactionPath_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); transactionPath_ = b; return b; } else { @@ -1095,10 +1220,13 @@ public final class ShardTransactionMessages { private void initFields() { transactionPath_ = ""; } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized != -1) + return isInitialized == 1; if (!hasTransactionPath()) { memoizedIsInitialized = 0; @@ -1109,7 +1237,7 @@ public final class ShardTransactionMessages { } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getTransactionPathBytes()); @@ -1118,14 +1246,17 @@ public final class ShardTransactionMessages { } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTransactionPathBytes()); + size += + com.google.protobuf.CodedOutputStream.computeBytesSize(1, + getTransactionPathBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -1133,6 +1264,7 @@ public final class ShardTransactionMessages { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { @@ -1144,47 +1276,54 @@ public final class ShardTransactionMessages { throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply parseFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply parseFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1192,12 +1331,22 @@ public final class ShardTransactionMessages { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply prototype) { + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( @@ -1205,38 +1354,41 @@ public final class ShardTransactionMessages { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.opendaylight.controller.mdsal.CreateTransactionReply} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReplyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + implements + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReplyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply.Builder.class); } - // Construct using org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply.newBuilder() + // Construct using + // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -1252,17 +1404,18 @@ public final class ShardTransactionMessages { return create().mergeFrom(buildPartial()); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_descriptor; } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply getDefaultInstanceForType() { - return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply.getDefaultInstance(); + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply + .getDefaultInstance(); } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply build() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply result = buildPartial(); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -1270,7 +1423,9 @@ public final class ShardTransactionMessages { } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply buildPartial() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply result = new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply(this); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply result = + new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply( + this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -1284,15 +1439,18 @@ public final class ShardTransactionMessages { public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply) { - return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply)other); + return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply other) { - if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply.getDefaultInstance()) return this; + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply other) { + if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply + .getDefaultInstance()) + return this; if (other.hasTransactionPath()) { bitField0_ |= 0x00000001; transactionPath_ = other.transactionPath_; @@ -1310,15 +1468,17 @@ public final class ShardTransactionMessages { return true; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply parsedMessage = null; + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply) e.getUnfinishedMessage(); + parsedMessage = + (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.CreateTransactionReply) e + .getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -1327,59 +1487,63 @@ public final class ShardTransactionMessages { } return this; } + private int bitField0_; // required string transactionPath = 1; private java.lang.Object transactionPath_ = ""; + /** * required string transactionPath = 1; */ public boolean hasTransactionPath() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * required string transactionPath = 1; */ public java.lang.String getTransactionPath() { java.lang.Object ref = transactionPath_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); + java.lang.String s = + ((com.google.protobuf.ByteString) ref).toStringUtf8(); transactionPath_ = s; return s; } else { return (java.lang.String) ref; } } + /** * required string transactionPath = 1; */ - public com.google.protobuf.ByteString - getTransactionPathBytes() { + public com.google.protobuf.ByteString getTransactionPathBytes() { java.lang.Object ref = transactionPath_; if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString + .copyFromUtf8((java.lang.String) ref); transactionPath_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * required string transactionPath = 1; */ - public Builder setTransactionPath( - java.lang.String value) { + public Builder setTransactionPath(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; transactionPath_ = value; onChanged(); return this; } + /** * required string transactionPath = 1; */ @@ -1389,15 +1553,16 @@ public final class ShardTransactionMessages { onChanged(); return this; } + /** * required string transactionPath = 1; */ public Builder setTransactionPathBytes( com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; transactionPath_ = value; onChanged(); return this; @@ -1414,23 +1579,28 @@ public final class ShardTransactionMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CreateTransactionReply) } - public interface ReadyTransactionOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface ReadyTransactionOrBuilder extends + com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code org.opendaylight.controller.mdsal.ReadyTransaction} */ public static final class ReadyTransaction extends - com.google.protobuf.GeneratedMessage - implements ReadyTransactionOrBuilder { + com.google.protobuf.GeneratedMessage implements ReadyTransactionOrBuilder { // Use ReadyTransaction.newBuilder() to construct. - private ReadyTransaction(com.google.protobuf.GeneratedMessage.Builder builder) { + private ReadyTransaction( + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private ReadyTransaction(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private ReadyTransaction(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final ReadyTransaction defaultInstance; + public static ReadyTransaction getDefaultInstance() { return defaultInstance; } @@ -1440,13 +1610,13 @@ public final class ShardTransactionMessages { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReadyTransaction( - com.google.protobuf.CodedInputStream input, + + private ReadyTransaction(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); @@ -1461,8 +1631,8 @@ public final class ShardTransactionMessages { done = true; break; default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { done = true; } break; @@ -1479,54 +1649,58 @@ public final class ShardTransactionMessages { makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadyTransaction_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadyTransaction_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public ReadyTransaction parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ReadyTransaction(input, extensionRegistry); - } - }; + public ReadyTransaction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReadyTransaction(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - private void initFields() { - } + private void initFields() {} + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized != -1) + return isInitialized == 1; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; size += getUnknownFields().getSerializedSize(); @@ -1535,6 +1709,7 @@ public final class ShardTransactionMessages { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { @@ -1546,47 +1721,54 @@ public final class ShardTransactionMessages { throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction parseFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction parseFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1594,12 +1776,22 @@ public final class ShardTransactionMessages { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction prototype) { + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( @@ -1607,38 +1799,41 @@ public final class ShardTransactionMessages { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.opendaylight.controller.mdsal.ReadyTransaction} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + implements + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadyTransaction_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadyTransaction_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction.Builder.class); } - // Construct using org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction.newBuilder() + // Construct using + // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -1652,17 +1847,18 @@ public final class ShardTransactionMessages { return create().mergeFrom(buildPartial()); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadyTransaction_descriptor; } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction getDefaultInstanceForType() { - return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction.getDefaultInstance(); + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction + .getDefaultInstance(); } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction build() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction result = buildPartial(); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -1670,23 +1866,28 @@ public final class ShardTransactionMessages { } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction buildPartial() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction result = new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction(this); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction result = + new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction( + this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction) { - return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction)other); + return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction other) { - if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction other) { + if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction + .getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -1694,15 +1895,17 @@ public final class ShardTransactionMessages { return true; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction parsedMessage = null; + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction) e.getUnfinishedMessage(); + parsedMessage = + (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransaction) e + .getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -1723,38 +1926,45 @@ public final class ShardTransactionMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.ReadyTransaction) } - public interface ReadyTransactionReplyOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface ReadyTransactionReplyOrBuilder extends + com.google.protobuf.MessageOrBuilder { // required string actorPath = 1; /** * required string actorPath = 1; */ boolean hasActorPath(); + /** * required string actorPath = 1; */ java.lang.String getActorPath(); + /** * required string actorPath = 1; */ - com.google.protobuf.ByteString - getActorPathBytes(); + com.google.protobuf.ByteString getActorPathBytes(); } /** * Protobuf type {@code org.opendaylight.controller.mdsal.ReadyTransactionReply} */ public static final class ReadyTransactionReply extends - com.google.protobuf.GeneratedMessage - implements ReadyTransactionReplyOrBuilder { + com.google.protobuf.GeneratedMessage implements + ReadyTransactionReplyOrBuilder { // Use ReadyTransactionReply.newBuilder() to construct. - private ReadyTransactionReply(com.google.protobuf.GeneratedMessage.Builder builder) { + private ReadyTransactionReply( + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private ReadyTransactionReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private ReadyTransactionReply(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final ReadyTransactionReply defaultInstance; + public static ReadyTransactionReply getDefaultInstance() { return defaultInstance; } @@ -1764,13 +1974,13 @@ public final class ShardTransactionMessages { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReadyTransactionReply( - com.google.protobuf.CodedInputStream input, + + private ReadyTransactionReply(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); @@ -1786,8 +1996,8 @@ public final class ShardTransactionMessages { done = true; break; default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { done = true; } break; @@ -1809,27 +2019,27 @@ public final class ShardTransactionMessages { makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadyTransactionReply_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadyTransactionReply_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public ReadyTransactionReply parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ReadyTransactionReply(input, extensionRegistry); - } - }; + public ReadyTransactionReply parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReadyTransactionReply(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { @@ -1840,12 +2050,14 @@ public final class ShardTransactionMessages { // required string actorPath = 1; public static final int ACTORPATH_FIELD_NUMBER = 1; private java.lang.Object actorPath_; + /** * required string actorPath = 1; */ public boolean hasActorPath() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * required string actorPath = 1; */ @@ -1863,16 +2075,15 @@ public final class ShardTransactionMessages { return s; } } + /** * required string actorPath = 1; */ - public com.google.protobuf.ByteString - getActorPathBytes() { + public com.google.protobuf.ByteString getActorPathBytes() { java.lang.Object ref = actorPath_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); actorPath_ = b; return b; } else { @@ -1883,10 +2094,13 @@ public final class ShardTransactionMessages { private void initFields() { actorPath_ = ""; } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized != -1) + return isInitialized == 1; if (!hasActorPath()) { memoizedIsInitialized = 0; @@ -1897,7 +2111,7 @@ public final class ShardTransactionMessages { } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getActorPathBytes()); @@ -1906,14 +2120,17 @@ public final class ShardTransactionMessages { } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getActorPathBytes()); + size += + com.google.protobuf.CodedOutputStream.computeBytesSize(1, + getActorPathBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -1921,6 +2138,7 @@ public final class ShardTransactionMessages { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { @@ -1932,47 +2150,54 @@ public final class ShardTransactionMessages { throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply parseFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply parseFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1980,12 +2205,22 @@ public final class ShardTransactionMessages { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply prototype) { + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( @@ -1993,38 +2228,41 @@ public final class ShardTransactionMessages { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.opendaylight.controller.mdsal.ReadyTransactionReply} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReplyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + implements + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReplyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadyTransactionReply_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadyTransactionReply_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply.Builder.class); } - // Construct using org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply.newBuilder() + // Construct using + // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -2040,17 +2278,18 @@ public final class ShardTransactionMessages { return create().mergeFrom(buildPartial()); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadyTransactionReply_descriptor; } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply getDefaultInstanceForType() { - return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply.getDefaultInstance(); + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply + .getDefaultInstance(); } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply build() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply result = buildPartial(); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -2058,7 +2297,9 @@ public final class ShardTransactionMessages { } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply buildPartial() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply result = new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply(this); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply result = + new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply( + this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -2072,15 +2313,18 @@ public final class ShardTransactionMessages { public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply) { - return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply)other); + return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply other) { - if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply.getDefaultInstance()) return this; + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply other) { + if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply + .getDefaultInstance()) + return this; if (other.hasActorPath()) { bitField0_ |= 0x00000001; actorPath_ = other.actorPath_; @@ -2098,15 +2342,17 @@ public final class ShardTransactionMessages { return true; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply parsedMessage = null; + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply) e.getUnfinishedMessage(); + parsedMessage = + (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadyTransactionReply) e + .getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -2115,59 +2361,63 @@ public final class ShardTransactionMessages { } return this; } + private int bitField0_; // required string actorPath = 1; private java.lang.Object actorPath_ = ""; + /** * required string actorPath = 1; */ public boolean hasActorPath() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** * required string actorPath = 1; */ public java.lang.String getActorPath() { java.lang.Object ref = actorPath_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); + java.lang.String s = + ((com.google.protobuf.ByteString) ref).toStringUtf8(); actorPath_ = s; return s; } else { return (java.lang.String) ref; } } + /** * required string actorPath = 1; */ - public com.google.protobuf.ByteString - getActorPathBytes() { + public com.google.protobuf.ByteString getActorPathBytes() { java.lang.Object ref = actorPath_; if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString + .copyFromUtf8((java.lang.String) ref); actorPath_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** * required string actorPath = 1; */ - public Builder setActorPath( - java.lang.String value) { + public Builder setActorPath(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; actorPath_ = value; onChanged(); return this; } + /** * required string actorPath = 1; */ @@ -2177,15 +2427,15 @@ public final class ShardTransactionMessages { onChanged(); return this; } + /** * required string actorPath = 1; */ - public Builder setActorPathBytes( - com.google.protobuf.ByteString value) { + public Builder setActorPathBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; actorPath_ = value; onChanged(); return this; @@ -2202,38 +2452,49 @@ public final class ShardTransactionMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.ReadyTransactionReply) } - public interface DeleteDataOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface DeleteDataOrBuilder extends + com.google.protobuf.MessageOrBuilder { - // required string instanceIdentifierPath = 1; + // repeated string instanceIdentifierPathArguments = 1; /** - * required string instanceIdentifierPath = 1; + * repeated string instanceIdentifierPathArguments = 1; */ - boolean hasInstanceIdentifierPath(); + java.util.List getInstanceIdentifierPathArgumentsList(); + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + int getInstanceIdentifierPathArgumentsCount(); + /** - * required string instanceIdentifierPath = 1; + * repeated string instanceIdentifierPathArguments = 1; */ - java.lang.String getInstanceIdentifierPath(); + java.lang.String getInstanceIdentifierPathArguments(int index); + /** - * required string instanceIdentifierPath = 1; + * repeated string instanceIdentifierPathArguments = 1; */ - com.google.protobuf.ByteString - getInstanceIdentifierPathBytes(); + com.google.protobuf.ByteString getInstanceIdentifierPathArgumentsBytes( + int index); } /** * Protobuf type {@code org.opendaylight.controller.mdsal.DeleteData} */ public static final class DeleteData extends - com.google.protobuf.GeneratedMessage - implements DeleteDataOrBuilder { + com.google.protobuf.GeneratedMessage implements DeleteDataOrBuilder { // Use DeleteData.newBuilder() to construct. private DeleteData(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private DeleteData(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private DeleteData(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final DeleteData defaultInstance; + public static DeleteData getDefaultInstance() { return defaultInstance; } @@ -2243,13 +2504,13 @@ public final class ShardTransactionMessages { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteData( - com.google.protobuf.CodedInputStream input, + + private DeleteData(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); @@ -2265,15 +2526,19 @@ public final class ShardTransactionMessages { done = true; break; default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { done = true; } break; } case 10: { - bitField0_ |= 0x00000001; - instanceIdentifierPath_ = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + instanceIdentifierPathArguments_ = + new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + instanceIdentifierPathArguments_.add(input.readBytes()); break; } } @@ -2284,115 +2549,118 @@ public final class ShardTransactionMessages { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + instanceIdentifierPathArguments_ = + new com.google.protobuf.UnmodifiableLazyStringList( + instanceIdentifierPathArguments_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DeleteData_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DeleteData_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public DeleteData parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteData(input, extensionRegistry); - } - }; + public DeleteData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteData(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - private int bitField0_; - // required string instanceIdentifierPath = 1; - public static final int INSTANCEIDENTIFIERPATH_FIELD_NUMBER = 1; - private java.lang.Object instanceIdentifierPath_; + // repeated string instanceIdentifierPathArguments = 1; + public static final int INSTANCEIDENTIFIERPATHARGUMENTS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList instanceIdentifierPathArguments_; + /** - * required string instanceIdentifierPath = 1; + * repeated string instanceIdentifierPathArguments = 1; */ - public boolean hasInstanceIdentifierPath() { - return ((bitField0_ & 0x00000001) == 0x00000001); + public java.util.List getInstanceIdentifierPathArgumentsList() { + return instanceIdentifierPathArguments_; } + /** - * required string instanceIdentifierPath = 1; + * repeated string instanceIdentifierPathArguments = 1; */ - public java.lang.String getInstanceIdentifierPath() { - java.lang.Object ref = instanceIdentifierPath_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - instanceIdentifierPath_ = s; - } - return s; - } + public int getInstanceIdentifierPathArgumentsCount() { + return instanceIdentifierPathArguments_.size(); } + /** - * required string instanceIdentifierPath = 1; + * repeated string instanceIdentifierPathArguments = 1; */ - public com.google.protobuf.ByteString - getInstanceIdentifierPathBytes() { - java.lang.Object ref = instanceIdentifierPath_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - instanceIdentifierPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public java.lang.String getInstanceIdentifierPathArguments(int index) { + return instanceIdentifierPathArguments_.get(index); + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public com.google.protobuf.ByteString getInstanceIdentifierPathArgumentsBytes( + int index) { + return instanceIdentifierPathArguments_.getByteString(index); } private void initFields() { - instanceIdentifierPath_ = ""; + instanceIdentifierPathArguments_ = + com.google.protobuf.LazyStringArrayList.EMPTY; } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized != -1) + return isInitialized == 1; - if (!hasInstanceIdentifierPath()) { - memoizedIsInitialized = 0; - return false; - } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getInstanceIdentifierPathBytes()); + for (int i = 0; i < instanceIdentifierPathArguments_.size(); i++) { + output.writeBytes(1, instanceIdentifierPathArguments_.getByteString(i)); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getInstanceIdentifierPathBytes()); + { + int dataSize = 0; + for (int i = 0; i < instanceIdentifierPathArguments_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(instanceIdentifierPathArguments_ + .getByteString(i)); + } + size += dataSize; + size += 1 * getInstanceIdentifierPathArgumentsList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -2400,6 +2668,7 @@ public final class ShardTransactionMessages { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { @@ -2411,47 +2680,54 @@ public final class ShardTransactionMessages { throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData parseFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData parseFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -2459,12 +2735,22 @@ public final class ShardTransactionMessages { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData prototype) { + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( @@ -2472,45 +2758,49 @@ public final class ShardTransactionMessages { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.opendaylight.controller.mdsal.DeleteData} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + implements + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DeleteData_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DeleteData_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData.Builder.class); } - // Construct using org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData.newBuilder() + // Construct using + // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); - instanceIdentifierPath_ = ""; + instanceIdentifierPathArguments_ = + com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -2519,17 +2809,18 @@ public final class ShardTransactionMessages { return create().mergeFrom(buildPartial()); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DeleteData_descriptor; } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData getDefaultInstanceForType() { - return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData.getDefaultInstance(); + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData + .getDefaultInstance(); } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData build() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData result = buildPartial(); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -2537,32 +2828,46 @@ public final class ShardTransactionMessages { } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData buildPartial() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData result = new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData(this); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData result = + new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData( + this); int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + instanceIdentifierPathArguments_ = + new com.google.protobuf.UnmodifiableLazyStringList( + instanceIdentifierPathArguments_); + bitField0_ = (bitField0_ & ~0x00000001); } - result.instanceIdentifierPath_ = instanceIdentifierPath_; - result.bitField0_ = to_bitField0_; + result.instanceIdentifierPathArguments_ = + instanceIdentifierPathArguments_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData) { - return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData)other); + return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData other) { - if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData.getDefaultInstance()) return this; - if (other.hasInstanceIdentifierPath()) { - bitField0_ |= 0x00000001; - instanceIdentifierPath_ = other.instanceIdentifierPath_; + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData other) { + if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData + .getDefaultInstance()) + return this; + if (!other.instanceIdentifierPathArguments_.isEmpty()) { + if (instanceIdentifierPathArguments_.isEmpty()) { + instanceIdentifierPathArguments_ = + other.instanceIdentifierPathArguments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstanceIdentifierPathArgumentsIsMutable(); + instanceIdentifierPathArguments_ + .addAll(other.instanceIdentifierPathArguments_); + } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -2570,22 +2875,20 @@ public final class ShardTransactionMessages { } public final boolean isInitialized() { - if (!hasInstanceIdentifierPath()) { - - return false; - } return true; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData parsedMessage = null; + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData) e.getUnfinishedMessage(); + parsedMessage = + (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteData) e + .getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -2594,78 +2897,111 @@ public final class ShardTransactionMessages { } return this; } + private int bitField0_; - // required string instanceIdentifierPath = 1; - private java.lang.Object instanceIdentifierPath_ = ""; + // repeated string instanceIdentifierPathArguments = 1; + private com.google.protobuf.LazyStringList instanceIdentifierPathArguments_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureInstanceIdentifierPathArgumentsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + instanceIdentifierPathArguments_ = + new com.google.protobuf.LazyStringArrayList( + instanceIdentifierPathArguments_); + bitField0_ |= 0x00000001; + } + } + /** - * required string instanceIdentifierPath = 1; + * repeated string instanceIdentifierPathArguments = 1; */ - public boolean hasInstanceIdentifierPath() { - return ((bitField0_ & 0x00000001) == 0x00000001); + public java.util.List getInstanceIdentifierPathArgumentsList() { + return java.util.Collections + .unmodifiableList(instanceIdentifierPathArguments_); } + /** - * required string instanceIdentifierPath = 1; + * repeated string instanceIdentifierPathArguments = 1; */ - public java.lang.String getInstanceIdentifierPath() { - java.lang.Object ref = instanceIdentifierPath_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - instanceIdentifierPath_ = s; - return s; - } else { - return (java.lang.String) ref; - } + public int getInstanceIdentifierPathArgumentsCount() { + return instanceIdentifierPathArguments_.size(); } + /** - * required string instanceIdentifierPath = 1; + * repeated string instanceIdentifierPathArguments = 1; */ - public com.google.protobuf.ByteString - getInstanceIdentifierPathBytes() { - java.lang.Object ref = instanceIdentifierPath_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - instanceIdentifierPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public java.lang.String getInstanceIdentifierPathArguments(int index) { + return instanceIdentifierPathArguments_.get(index); + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public com.google.protobuf.ByteString getInstanceIdentifierPathArgumentsBytes( + int index) { + return instanceIdentifierPathArguments_.getByteString(index); } + /** - * required string instanceIdentifierPath = 1; + * repeated string instanceIdentifierPathArguments = 1; */ - public Builder setInstanceIdentifierPath( + public Builder setInstanceIdentifierPathArguments(int index, java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - instanceIdentifierPath_ = value; + throw new NullPointerException(); + } + ensureInstanceIdentifierPathArgumentsIsMutable(); + instanceIdentifierPathArguments_.set(index, value); + onChanged(); + return this; + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public Builder addInstanceIdentifierPathArguments(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceIdentifierPathArgumentsIsMutable(); + instanceIdentifierPathArguments_.add(value); + onChanged(); + return this; + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public Builder addAllInstanceIdentifierPathArguments( + java.lang.Iterable values) { + ensureInstanceIdentifierPathArgumentsIsMutable(); + super.addAll(values, instanceIdentifierPathArguments_); onChanged(); return this; } + /** - * required string instanceIdentifierPath = 1; + * repeated string instanceIdentifierPathArguments = 1; */ - public Builder clearInstanceIdentifierPath() { + public Builder clearInstanceIdentifierPathArguments() { + instanceIdentifierPathArguments_ = + com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); - instanceIdentifierPath_ = getDefaultInstance().getInstanceIdentifierPath(); onChanged(); return this; } + /** - * required string instanceIdentifierPath = 1; + * repeated string instanceIdentifierPathArguments = 1; */ - public Builder setInstanceIdentifierPathBytes( + public Builder addInstanceIdentifierPathArgumentsBytes( com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - instanceIdentifierPath_ = value; + throw new NullPointerException(); + } + ensureInstanceIdentifierPathArgumentsIsMutable(); + instanceIdentifierPathArguments_.add(value); onChanged(); return this; } @@ -2681,23 +3017,28 @@ public final class ShardTransactionMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.DeleteData) } - public interface DeleteDataReplyOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface DeleteDataReplyOrBuilder extends + com.google.protobuf.MessageOrBuilder { } /** * Protobuf type {@code org.opendaylight.controller.mdsal.DeleteDataReply} */ public static final class DeleteDataReply extends - com.google.protobuf.GeneratedMessage - implements DeleteDataReplyOrBuilder { + com.google.protobuf.GeneratedMessage implements DeleteDataReplyOrBuilder { // Use DeleteDataReply.newBuilder() to construct. - private DeleteDataReply(com.google.protobuf.GeneratedMessage.Builder builder) { + private DeleteDataReply( + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private DeleteDataReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private DeleteDataReply(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } private static final DeleteDataReply defaultInstance; + public static DeleteDataReply getDefaultInstance() { return defaultInstance; } @@ -2707,13 +3048,13 @@ public final class ShardTransactionMessages { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteDataReply( - com.google.protobuf.CodedInputStream input, + + private DeleteDataReply(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); @@ -2728,8 +3069,8 @@ public final class ShardTransactionMessages { done = true; break; default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { done = true; } break; @@ -2746,54 +3087,58 @@ public final class ShardTransactionMessages { makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DeleteDataReply_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DeleteDataReply_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public DeleteDataReply parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteDataReply(input, extensionRegistry); - } - }; + public DeleteDataReply parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteDataReply(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - private void initFields() { - } + private void initFields() {} + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized != -1) + return isInitialized == 1; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; size += getUnknownFields().getSerializedSize(); @@ -2802,6 +3147,7 @@ public final class ShardTransactionMessages { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { @@ -2813,47 +3159,54 @@ public final class ShardTransactionMessages { throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply parseFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply parseFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -2861,12 +3214,22 @@ public final class ShardTransactionMessages { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply prototype) { + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( @@ -2874,38 +3237,41 @@ public final class ShardTransactionMessages { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.opendaylight.controller.mdsal.DeleteDataReply} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReplyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + implements + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReplyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DeleteDataReply_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DeleteDataReply_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply.Builder.class); } - // Construct using org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply.newBuilder() + // Construct using + // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } @@ -2919,17 +3285,18 @@ public final class ShardTransactionMessages { return create().mergeFrom(buildPartial()); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DeleteDataReply_descriptor; } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply getDefaultInstanceForType() { - return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply.getDefaultInstance(); + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply + .getDefaultInstance(); } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply build() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply result = buildPartial(); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -2937,22 +3304,27 @@ public final class ShardTransactionMessages { } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply buildPartial() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply result = new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply(this); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply result = + new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply( + this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply) { - return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply)other); + return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply other) { - if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply.getDefaultInstance()) return this; + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply other) { + if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply + .getDefaultInstance()) + return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -2961,15 +3333,17 @@ public final class ShardTransactionMessages { return true; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply parsedMessage = null; + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply) e.getUnfinishedMessage(); + parsedMessage = + (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.DeleteDataReply) e + .getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -2990,38 +3364,43 @@ public final class ShardTransactionMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.DeleteDataReply) } - public interface ReadDataOrBuilder - extends com.google.protobuf.MessageOrBuilder { + public interface ReadDataOrBuilder extends + com.google.protobuf.MessageOrBuilder { - // required string intanceIdentifier = 1; + // required string instanceIdentifierPathArguments = 1; /** - * required string intanceIdentifier = 1; + * required string instanceIdentifierPathArguments = 1; */ - boolean hasIntanceIdentifier(); + boolean hasInstanceIdentifierPathArguments(); + /** - * required string intanceIdentifier = 1; + * required string instanceIdentifierPathArguments = 1; */ - java.lang.String getIntanceIdentifier(); + java.lang.String getInstanceIdentifierPathArguments(); + /** - * required string intanceIdentifier = 1; + * required string instanceIdentifierPathArguments = 1; */ - com.google.protobuf.ByteString - getIntanceIdentifierBytes(); + com.google.protobuf.ByteString getInstanceIdentifierPathArgumentsBytes(); } /** * Protobuf type {@code org.opendaylight.controller.mdsal.ReadData} */ public static final class ReadData extends - com.google.protobuf.GeneratedMessage - implements ReadDataOrBuilder { + com.google.protobuf.GeneratedMessage implements ReadDataOrBuilder { // Use ReadData.newBuilder() to construct. private ReadData(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private ReadData(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final ReadData defaultInstance; + private ReadData(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + + private static final ReadData defaultInstance; + public static ReadData getDefaultInstance() { return defaultInstance; } @@ -3031,13 +3410,13 @@ public final class ShardTransactionMessages { } private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReadData( - com.google.protobuf.CodedInputStream input, + + private ReadData(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); @@ -3053,15 +3432,15 @@ public final class ShardTransactionMessages { done = true; break; default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { done = true; } break; } case 10: { bitField0_ |= 0x00000001; - intanceIdentifier_ = input.readBytes(); + instanceIdentifierPathArguments_ = input.readBytes(); break; } } @@ -3076,27 +3455,27 @@ public final class ShardTransactionMessages { makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadData_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadData_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData.Builder.class); } public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - public ReadData parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ReadData(input, extensionRegistry); - } - }; + public ReadData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReadData(input, extensionRegistry); + } + }; @java.lang.Override public com.google.protobuf.Parser getParserForType() { @@ -3104,20 +3483,22 @@ public final class ShardTransactionMessages { } private int bitField0_; - // required string intanceIdentifier = 1; - public static final int INTANCEIDENTIFIER_FIELD_NUMBER = 1; - private java.lang.Object intanceIdentifier_; + // required string instanceIdentifierPathArguments = 1; + public static final int INSTANCEIDENTIFIERPATHARGUMENTS_FIELD_NUMBER = 1; + private java.lang.Object instanceIdentifierPathArguments_; + /** - * required string intanceIdentifier = 1; + * required string instanceIdentifierPathArguments = 1; */ - public boolean hasIntanceIdentifier() { + public boolean hasInstanceIdentifierPathArguments() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** - * required string intanceIdentifier = 1; + * required string instanceIdentifierPathArguments = 1; */ - public java.lang.String getIntanceIdentifier() { - java.lang.Object ref = intanceIdentifier_; + public java.lang.String getInstanceIdentifierPathArguments() { + java.lang.Object ref = instanceIdentifierPathArguments_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -3125,22 +3506,21 @@ public final class ShardTransactionMessages { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - intanceIdentifier_ = s; + instanceIdentifierPathArguments_ = s; } return s; } } + /** - * required string intanceIdentifier = 1; + * required string instanceIdentifierPathArguments = 1; */ - public com.google.protobuf.ByteString - getIntanceIdentifierBytes() { - java.lang.Object ref = intanceIdentifier_; + public com.google.protobuf.ByteString getInstanceIdentifierPathArgumentsBytes() { + java.lang.Object ref = instanceIdentifierPathArguments_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - intanceIdentifier_ = b; + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceIdentifierPathArguments_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -3148,14 +3528,17 @@ public final class ShardTransactionMessages { } private void initFields() { - intanceIdentifier_ = ""; + instanceIdentifierPathArguments_ = ""; } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + if (isInitialized != -1) + return isInitialized == 1; - if (!hasIntanceIdentifier()) { + if (!hasInstanceIdentifierPathArguments()) { memoizedIsInitialized = 0; return false; } @@ -3164,23 +3547,26 @@ public final class ShardTransactionMessages { } public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getIntanceIdentifierBytes()); + output.writeBytes(1, getInstanceIdentifierPathArgumentsBytes()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; + public int getSerializedSize() { int size = memoizedSerializedSize; - if (size != -1) return size; + if (size != -1) + return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getIntanceIdentifierBytes()); + size += + com.google.protobuf.CodedOutputStream.computeBytesSize(1, + getInstanceIdentifierPathArgumentsBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -3188,6 +3574,7 @@ public final class ShardTransactionMessages { } private static final long serialVersionUID = 0L; + @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { @@ -3199,47 +3586,54 @@ public final class ShardTransactionMessages { throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData parseFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData parseFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -3247,12 +3641,22 @@ public final class ShardTransactionMessages { return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData prototype) { + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + + public Builder toBuilder() { + return newBuilder(this); + } @java.lang.Override protected Builder newBuilderForType( @@ -3260,45 +3664,48 @@ public final class ShardTransactionMessages { Builder builder = new Builder(parent); return builder; } + /** * Protobuf type {@code org.opendaylight.controller.mdsal.ReadData} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { + implements + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadData_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadData_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData.class, org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData.Builder.class); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData.Builder.class); } - // Construct using org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData.newBuilder() + // Construct using + // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } + private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); - intanceIdentifier_ = ""; + instanceIdentifierPathArguments_ = ""; bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -3307,17 +3714,18 @@ public final class ShardTransactionMessages { return create().mergeFrom(buildPartial()); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadData_descriptor; } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData getDefaultInstanceForType() { - return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData.getDefaultInstance(); + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData + .getDefaultInstance(); } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData build() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData result = buildPartial(); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -3325,13 +3733,16 @@ public final class ShardTransactionMessages { } public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData buildPartial() { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData result = new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData(this); + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData result = + new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData( + this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.intanceIdentifier_ = intanceIdentifier_; + result.instanceIdentifierPathArguments_ = + instanceIdentifierPathArguments_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -3339,18 +3750,22 @@ public final class ShardTransactionMessages { public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData) { - return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData)other); + return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData other) { - if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData.getDefaultInstance()) return this; - if (other.hasIntanceIdentifier()) { + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData other) { + if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData + .getDefaultInstance()) + return this; + if (other.hasInstanceIdentifierPathArguments()) { bitField0_ |= 0x00000001; - intanceIdentifier_ = other.intanceIdentifier_; + instanceIdentifierPathArguments_ = + other.instanceIdentifierPathArguments_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -3358,21 +3773,24 @@ public final class ShardTransactionMessages { } public final boolean isInitialized() { - if (!hasIntanceIdentifier()) { + if (!hasInstanceIdentifierPathArguments()) { + return false; } return true; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData parsedMessage = null; + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData) e.getUnfinishedMessage(); + parsedMessage = + (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadData) e + .getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -3381,78 +3799,84 @@ public final class ShardTransactionMessages { } return this; } + private int bitField0_; - // required string intanceIdentifier = 1; - private java.lang.Object intanceIdentifier_ = ""; + // required string instanceIdentifierPathArguments = 1; + private java.lang.Object instanceIdentifierPathArguments_ = ""; + /** - * required string intanceIdentifier = 1; + * required string instanceIdentifierPathArguments = 1; */ - public boolean hasIntanceIdentifier() { + public boolean hasInstanceIdentifierPathArguments() { return ((bitField0_ & 0x00000001) == 0x00000001); } + /** - * required string intanceIdentifier = 1; + * required string instanceIdentifierPathArguments = 1; */ - public java.lang.String getIntanceIdentifier() { - java.lang.Object ref = intanceIdentifier_; + public java.lang.String getInstanceIdentifierPathArguments() { + java.lang.Object ref = instanceIdentifierPathArguments_; if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - intanceIdentifier_ = s; + java.lang.String s = + ((com.google.protobuf.ByteString) ref).toStringUtf8(); + instanceIdentifierPathArguments_ = s; return s; } else { return (java.lang.String) ref; } } + /** - * required string intanceIdentifier = 1; + * required string instanceIdentifierPathArguments = 1; */ - public com.google.protobuf.ByteString - getIntanceIdentifierBytes() { - java.lang.Object ref = intanceIdentifier_; + public com.google.protobuf.ByteString getInstanceIdentifierPathArgumentsBytes() { + java.lang.Object ref = instanceIdentifierPathArguments_; if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - intanceIdentifier_ = b; + com.google.protobuf.ByteString + .copyFromUtf8((java.lang.String) ref); + instanceIdentifierPathArguments_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + /** - * required string intanceIdentifier = 1; + * required string instanceIdentifierPathArguments = 1; */ - public Builder setIntanceIdentifier( - java.lang.String value) { + public Builder setInstanceIdentifierPathArguments(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - intanceIdentifier_ = value; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + instanceIdentifierPathArguments_ = value; onChanged(); return this; } + /** - * required string intanceIdentifier = 1; + * required string instanceIdentifierPathArguments = 1; */ - public Builder clearIntanceIdentifier() { + public Builder clearInstanceIdentifierPathArguments() { bitField0_ = (bitField0_ & ~0x00000001); - intanceIdentifier_ = getDefaultInstance().getIntanceIdentifier(); + instanceIdentifierPathArguments_ = + getDefaultInstance().getInstanceIdentifierPathArguments(); onChanged(); return this; } + /** - * required string intanceIdentifier = 1; + * required string instanceIdentifierPathArguments = 1; */ - public Builder setIntanceIdentifierBytes( + public Builder setInstanceIdentifierPathArgumentsBytes( com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - intanceIdentifier_ = value; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + instanceIdentifierPathArguments_ = value; onChanged(); return this; } @@ -3468,138 +3892,1885 @@ public final class ShardTransactionMessages { // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.ReadData) } - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CloseTransaction_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CloseTransaction_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CreateTransaction_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CreateTransaction_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_ReadyTransaction_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_ReadyTransaction_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_ReadyTransactionReply_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_ReadyTransactionReply_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_DeleteData_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_DeleteData_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_DeleteDataReply_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_DeleteDataReply_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_ReadData_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_ReadData_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; + public interface ReadDataReplyOrBuilder extends + com.google.protobuf.MessageOrBuilder { + + // required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 1; + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 1; + */ + boolean hasNormalizedNode(); + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 1; + */ + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getNormalizedNode(); + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 1; + */ + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder getNormalizedNodeOrBuilder(); } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\036ShardTransactionMessages.proto\022!org.op" + - "endaylight.controller.mdsal\"\022\n\020CloseTran" + - "saction\"\027\n\025CloseTransactionReply\"\023\n\021Crea" + - "teTransaction\"1\n\026CreateTransactionReply\022" + - "\027\n\017transactionPath\030\001 \002(\t\"\022\n\020ReadyTransac" + - "tion\"*\n\025ReadyTransactionReply\022\021\n\tactorPa" + - "th\030\001 \002(\t\",\n\nDeleteData\022\036\n\026instanceIdenti" + - "fierPath\030\001 \002(\t\"\021\n\017DeleteDataReply\"%\n\010Rea" + - "dData\022\031\n\021intanceIdentifier\030\001 \002(\tBU\n9org." + - "opendaylight.controller.cluster.datastor", - "e.transactionB\030ShardTransactionMessages" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_org_opendaylight_controller_mdsal_CloseTransaction_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_opendaylight_controller_mdsal_CloseTransaction_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CloseTransaction_descriptor, - new java.lang.String[] { }); - internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_descriptor, - new java.lang.String[] { }); - internal_static_org_opendaylight_controller_mdsal_CreateTransaction_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_org_opendaylight_controller_mdsal_CreateTransaction_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CreateTransaction_descriptor, - new java.lang.String[] { }); - internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_descriptor, - new java.lang.String[] { "TransactionPath", }); - internal_static_org_opendaylight_controller_mdsal_ReadyTransaction_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_org_opendaylight_controller_mdsal_ReadyTransaction_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_ReadyTransaction_descriptor, - new java.lang.String[] { }); - internal_static_org_opendaylight_controller_mdsal_ReadyTransactionReply_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_org_opendaylight_controller_mdsal_ReadyTransactionReply_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_ReadyTransactionReply_descriptor, - new java.lang.String[] { "ActorPath", }); - internal_static_org_opendaylight_controller_mdsal_DeleteData_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_org_opendaylight_controller_mdsal_DeleteData_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_DeleteData_descriptor, - new java.lang.String[] { "InstanceIdentifierPath", }); - internal_static_org_opendaylight_controller_mdsal_DeleteDataReply_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_org_opendaylight_controller_mdsal_DeleteDataReply_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_DeleteDataReply_descriptor, - new java.lang.String[] { }); - internal_static_org_opendaylight_controller_mdsal_ReadData_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_org_opendaylight_controller_mdsal_ReadData_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_ReadData_descriptor, - new java.lang.String[] { "IntanceIdentifier", }); - return null; - } - }; + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.ReadDataReply} + */ + public static final class ReadDataReply extends + com.google.protobuf.GeneratedMessage implements ReadDataReplyOrBuilder { + // Use ReadDataReply.newBuilder() to construct. + private ReadDataReply( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + + private ReadDataReply(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + + private static final ReadDataReply defaultInstance; + + public static ReadDataReply getDefaultInstance() { + return defaultInstance; + } + + public ReadDataReply getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReadDataReply(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { + done = true; + } + break; + } + case 10: { + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder subBuilder = + null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = normalizedNode_.toBuilder(); + } + normalizedNode_ = + input + .readMessage( + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.PARSER, + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(normalizedNode_); + normalizedNode_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadDataReply_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadDataReply_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ReadDataReply parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReadDataReply(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 1; + public static final int NORMALIZEDNODE_FIELD_NUMBER = 1; + private org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml normalizedNode_; + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 1; + */ + public boolean hasNormalizedNode() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 1; + */ + public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getNormalizedNode() { + return normalizedNode_; + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 1; + */ + public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder getNormalizedNodeOrBuilder() { + return normalizedNode_; + } + + private void initFields() { + normalizedNode_ = + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) + return isInitialized == 1; + + if (!hasNormalizedNode()) { + memoizedIsInitialized = 0; + return false; + } + if (!getNormalizedNode().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, normalizedNode_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) + return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, + normalizedNode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply parseFrom( + java.io.InputStream input) throws java.io.IOException { + return PARSER.parseFrom(input); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return PARSER.parseFrom(input); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.ReadDataReply} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReplyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadDataReply_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadDataReply_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply.Builder.class); + } + + // Construct using + // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getNormalizedNodeFieldBuilder(); + } + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (normalizedNodeBuilder_ == null) { + normalizedNode_ = + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .getDefaultInstance(); + } else { + normalizedNodeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadDataReply_descriptor; + } + + public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply getDefaultInstanceForType() { + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply + .getDefaultInstance(); + } + + public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply build() { + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply buildPartial() { + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply result = + new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply( + this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (normalizedNodeBuilder_ == null) { + result.normalizedNode_ = normalizedNode_; + } else { + result.normalizedNode_ = normalizedNodeBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply) { + return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply other) { + if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply + .getDefaultInstance()) + return this; + if (other.hasNormalizedNode()) { + mergeNormalizedNode(other.getNormalizedNode()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasNormalizedNode()) { + + return false; + } + if (!getNormalizedNode().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.ReadDataReply) e + .getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + // required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 1; + private org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml normalizedNode_ = + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder normalizedNodeBuilder_; + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 1; + */ + public boolean hasNormalizedNode() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 1; + */ + public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getNormalizedNode() { + if (normalizedNodeBuilder_ == null) { + return normalizedNode_; + } else { + return normalizedNodeBuilder_.getMessage(); + } + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 1; + */ + public Builder setNormalizedNode( + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml value) { + if (normalizedNodeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + normalizedNode_ = value; + onChanged(); + } else { + normalizedNodeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 1; + */ + public Builder setNormalizedNode( + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder builderForValue) { + if (normalizedNodeBuilder_ == null) { + normalizedNode_ = builderForValue.build(); + onChanged(); + } else { + normalizedNodeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 1; + */ + public Builder mergeNormalizedNode( + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml value) { + if (normalizedNodeBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) + && normalizedNode_ != org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .getDefaultInstance()) { + normalizedNode_ = + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .newBuilder(normalizedNode_).mergeFrom(value) + .buildPartial(); + } else { + normalizedNode_ = value; + } + onChanged(); + } else { + normalizedNodeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 1; + */ + public Builder clearNormalizedNode() { + if (normalizedNodeBuilder_ == null) { + normalizedNode_ = + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .getDefaultInstance(); + onChanged(); + } else { + normalizedNodeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 1; + */ + public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder getNormalizedNodeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getNormalizedNodeFieldBuilder().getBuilder(); + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 1; + */ + public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder getNormalizedNodeOrBuilder() { + if (normalizedNodeBuilder_ != null) { + return normalizedNodeBuilder_.getMessageOrBuilder(); + } else { + return normalizedNode_; + } + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 1; + */ + private com.google.protobuf.SingleFieldBuilder getNormalizedNodeFieldBuilder() { + if (normalizedNodeBuilder_ == null) { + normalizedNodeBuilder_ = + new com.google.protobuf.SingleFieldBuilder( + normalizedNode_, getParentForChildren(), isClean()); + normalizedNode_ = null; + } + return normalizedNodeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.ReadDataReply) + } + + static { + defaultInstance = new ReadDataReply(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.ReadDataReply) + } + + public interface WriteDataOrBuilder extends + com.google.protobuf.MessageOrBuilder { + + // repeated string instanceIdentifierPathArguments = 1; + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + java.util.List getInstanceIdentifierPathArgumentsList(); + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + int getInstanceIdentifierPathArgumentsCount(); + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + java.lang.String getInstanceIdentifierPathArguments(int index); + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + com.google.protobuf.ByteString getInstanceIdentifierPathArgumentsBytes( + int index); + + // required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 2; + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 2; + */ + boolean hasNormalizedNode(); + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 2; + */ + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getNormalizedNode(); + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 2; + */ + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder getNormalizedNodeOrBuilder(); + } + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.WriteData} + */ + public static final class WriteData extends + com.google.protobuf.GeneratedMessage implements WriteDataOrBuilder { + // Use WriteData.newBuilder() to construct. + private WriteData(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + + private WriteData(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + + private static final WriteData defaultInstance; + + public static WriteData getDefaultInstance() { + return defaultInstance; + } + + public WriteData getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WriteData(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + instanceIdentifierPathArguments_ = + new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + instanceIdentifierPathArguments_.add(input.readBytes()); + break; + } + case 18: { + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder subBuilder = + null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = normalizedNode_.toBuilder(); + } + normalizedNode_ = + input + .readMessage( + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.PARSER, + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(normalizedNode_); + normalizedNode_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + instanceIdentifierPathArguments_ = + new com.google.protobuf.UnmodifiableLazyStringList( + instanceIdentifierPathArguments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_WriteData_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_WriteData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public WriteData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WriteData(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // repeated string instanceIdentifierPathArguments = 1; + public static final int INSTANCEIDENTIFIERPATHARGUMENTS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList instanceIdentifierPathArguments_; + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public java.util.List getInstanceIdentifierPathArgumentsList() { + return instanceIdentifierPathArguments_; + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public int getInstanceIdentifierPathArgumentsCount() { + return instanceIdentifierPathArguments_.size(); + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public java.lang.String getInstanceIdentifierPathArguments(int index) { + return instanceIdentifierPathArguments_.get(index); + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public com.google.protobuf.ByteString getInstanceIdentifierPathArgumentsBytes( + int index) { + return instanceIdentifierPathArguments_.getByteString(index); + } + + // required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 2; + public static final int NORMALIZEDNODE_FIELD_NUMBER = 2; + private org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml normalizedNode_; + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 2; + */ + public boolean hasNormalizedNode() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 2; + */ + public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getNormalizedNode() { + return normalizedNode_; + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 2; + */ + public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder getNormalizedNodeOrBuilder() { + return normalizedNode_; + } + + private void initFields() { + instanceIdentifierPathArguments_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + normalizedNode_ = + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) + return isInitialized == 1; + + if (!hasNormalizedNode()) { + memoizedIsInitialized = 0; + return false; + } + if (!getNormalizedNode().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < instanceIdentifierPathArguments_.size(); i++) { + output.writeBytes(1, instanceIdentifierPathArguments_.getByteString(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(2, normalizedNode_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) + return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < instanceIdentifierPathArguments_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(instanceIdentifierPathArguments_ + .getByteString(i)); + } + size += dataSize; + size += 1 * getInstanceIdentifierPathArgumentsList().size(); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, + normalizedNode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return PARSER.parseFrom(input); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return PARSER.parseFrom(input); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.WriteData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_WriteData_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_WriteData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData.Builder.class); + } + + // Construct using + // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getNormalizedNodeFieldBuilder(); + } + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + instanceIdentifierPathArguments_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (normalizedNodeBuilder_ == null) { + normalizedNode_ = + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .getDefaultInstance(); + } else { + normalizedNodeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_WriteData_descriptor; + } + + public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData getDefaultInstanceForType() { + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData + .getDefaultInstance(); + } + + public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData build() { + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData buildPartial() { + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData result = + new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData( + this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + instanceIdentifierPathArguments_ = + new com.google.protobuf.UnmodifiableLazyStringList( + instanceIdentifierPathArguments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.instanceIdentifierPathArguments_ = + instanceIdentifierPathArguments_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; + } + if (normalizedNodeBuilder_ == null) { + result.normalizedNode_ = normalizedNode_; + } else { + result.normalizedNode_ = normalizedNodeBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData) { + return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData other) { + if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData + .getDefaultInstance()) + return this; + if (!other.instanceIdentifierPathArguments_.isEmpty()) { + if (instanceIdentifierPathArguments_.isEmpty()) { + instanceIdentifierPathArguments_ = + other.instanceIdentifierPathArguments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstanceIdentifierPathArgumentsIsMutable(); + instanceIdentifierPathArguments_ + .addAll(other.instanceIdentifierPathArguments_); + } + onChanged(); + } + if (other.hasNormalizedNode()) { + mergeNormalizedNode(other.getNormalizedNode()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasNormalizedNode()) { + + return false; + } + if (!getNormalizedNode().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteData) e + .getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + // repeated string instanceIdentifierPathArguments = 1; + private com.google.protobuf.LazyStringList instanceIdentifierPathArguments_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureInstanceIdentifierPathArgumentsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + instanceIdentifierPathArguments_ = + new com.google.protobuf.LazyStringArrayList( + instanceIdentifierPathArguments_); + bitField0_ |= 0x00000001; + } + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public java.util.List getInstanceIdentifierPathArgumentsList() { + return java.util.Collections + .unmodifiableList(instanceIdentifierPathArguments_); + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public int getInstanceIdentifierPathArgumentsCount() { + return instanceIdentifierPathArguments_.size(); + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public java.lang.String getInstanceIdentifierPathArguments(int index) { + return instanceIdentifierPathArguments_.get(index); + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public com.google.protobuf.ByteString getInstanceIdentifierPathArgumentsBytes( + int index) { + return instanceIdentifierPathArguments_.getByteString(index); + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public Builder setInstanceIdentifierPathArguments(int index, + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceIdentifierPathArgumentsIsMutable(); + instanceIdentifierPathArguments_.set(index, value); + onChanged(); + return this; + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public Builder addInstanceIdentifierPathArguments(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceIdentifierPathArgumentsIsMutable(); + instanceIdentifierPathArguments_.add(value); + onChanged(); + return this; + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public Builder addAllInstanceIdentifierPathArguments( + java.lang.Iterable values) { + ensureInstanceIdentifierPathArgumentsIsMutable(); + super.addAll(values, instanceIdentifierPathArguments_); + onChanged(); + return this; + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public Builder clearInstanceIdentifierPathArguments() { + instanceIdentifierPathArguments_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * repeated string instanceIdentifierPathArguments = 1; + */ + public Builder addInstanceIdentifierPathArgumentsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstanceIdentifierPathArgumentsIsMutable(); + instanceIdentifierPathArguments_.add(value); + onChanged(); + return this; + } + + // required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 2; + private org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml normalizedNode_ = + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder normalizedNodeBuilder_; + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 2; + */ + public boolean hasNormalizedNode() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 2; + */ + public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getNormalizedNode() { + if (normalizedNodeBuilder_ == null) { + return normalizedNode_; + } else { + return normalizedNodeBuilder_.getMessage(); + } + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 2; + */ + public Builder setNormalizedNode( + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml value) { + if (normalizedNodeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + normalizedNode_ = value; + onChanged(); + } else { + normalizedNodeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 2; + */ + public Builder setNormalizedNode( + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder builderForValue) { + if (normalizedNodeBuilder_ == null) { + normalizedNode_ = builderForValue.build(); + onChanged(); + } else { + normalizedNodeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 2; + */ + public Builder mergeNormalizedNode( + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml value) { + if (normalizedNodeBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) + && normalizedNode_ != org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .getDefaultInstance()) { + normalizedNode_ = + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .newBuilder(normalizedNode_).mergeFrom(value) + .buildPartial(); + } else { + normalizedNode_ = value; + } + onChanged(); + } else { + normalizedNodeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 2; + */ + public Builder clearNormalizedNode() { + if (normalizedNodeBuilder_ == null) { + normalizedNode_ = + org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml + .getDefaultInstance(); + onChanged(); + } else { + normalizedNodeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 2; + */ + public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder getNormalizedNodeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getNormalizedNodeFieldBuilder().getBuilder(); + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 2; + */ + public org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder getNormalizedNodeOrBuilder() { + if (normalizedNodeBuilder_ != null) { + return normalizedNodeBuilder_.getMessageOrBuilder(); + } else { + return normalizedNode_; + } + } + + /** + * required .org.opendaylight.controller.mdsal.NormalizedNodeXml normalizedNode = 2; + */ + private com.google.protobuf.SingleFieldBuilder getNormalizedNodeFieldBuilder() { + if (normalizedNodeBuilder_ == null) { + normalizedNodeBuilder_ = + new com.google.protobuf.SingleFieldBuilder( + normalizedNode_, getParentForChildren(), isClean()); + normalizedNode_ = null; + } + return normalizedNodeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.WriteData) + } + + static { + defaultInstance = new WriteData(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.WriteData) + } + + public interface WriteDataReplyOrBuilder extends + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.WriteDataReply} + */ + public static final class WriteDataReply extends + com.google.protobuf.GeneratedMessage implements WriteDataReplyOrBuilder { + // Use WriteDataReply.newBuilder() to construct. + private WriteDataReply( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + + private WriteDataReply(boolean noInit) { + this.unknownFields = + com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + + private static final WriteDataReply defaultInstance; + + public static WriteDataReply getDefaultInstance() { + return defaultInstance; + } + + public WriteDataReply getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WriteDataReply(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, extensionRegistry, + tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_WriteDataReply_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_WriteDataReply_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public WriteDataReply parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WriteDataReply(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() {} + + private byte memoizedIsInitialized = -1; + + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) + return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) + return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply parseFrom( + java.io.InputStream input) throws java.io.IOException { + return PARSER.parseFrom(input); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return PARSER.parseFrom(input); + } + + public static org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { + return Builder.create(); + } + + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply prototype) { + return newBuilder().mergeFrom(prototype); + } + + public Builder toBuilder() { + return newBuilder(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * Protobuf type {@code org.opendaylight.controller.mdsal.WriteDataReply} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReplyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_WriteDataReply_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_WriteDataReply_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply.class, + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply.Builder.class); + } + + // Construct using + // org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_WriteDataReply_descriptor; + } + + public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply getDefaultInstanceForType() { + return org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply + .getDefaultInstance(); + } + + public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply build() { + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply buildPartial() { + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply result = + new org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply( + this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply) { + return mergeFrom((org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply other) { + if (other == org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply + .getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom(com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (org.opendaylight.controller.cluster.datastore.transaction.ShardTransactionMessages.WriteDataReply) e + .getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.WriteDataReply) + } + + static { + defaultInstance = new WriteDataReply(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.WriteDataReply) + } + + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_CloseTransaction_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_CloseTransaction_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_CreateTransaction_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_CreateTransaction_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_ReadyTransaction_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_ReadyTransaction_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_ReadyTransactionReply_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_ReadyTransactionReply_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_DeleteData_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_DeleteData_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_DeleteDataReply_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_DeleteDataReply_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_ReadData_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_ReadData_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_ReadDataReply_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_ReadDataReply_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_WriteData_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_WriteData_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor internal_static_org_opendaylight_controller_mdsal_WriteDataReply_descriptor; + private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_opendaylight_controller_mdsal_WriteDataReply_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + static { + java.lang.String[] descriptorData = + { + "\n\026ShardTransaction.proto\022!org.opendaylig" + + "ht.controller.mdsal\032\032SimpleNormalizedNod" + + "e.proto\"\022\n\020CloseTransaction\"\027\n\025CloseTran" + + "sactionReply\"\023\n\021CreateTransaction\"1\n\026Cre" + + "ateTransactionReply\022\027\n\017transactionPath\030\001" + + " \002(\t\"\022\n\020ReadyTransaction\"*\n\025ReadyTransac" + + "tionReply\022\021\n\tactorPath\030\001 \002(\t\"5\n\nDeleteDa" + + "ta\022\'\n\037instanceIdentifierPathArguments\030\001 " + + "\003(\t\"\021\n\017DeleteDataReply\"3\n\010ReadData\022\'\n\037in" + + "stanceIdentifierPathArguments\030\001 \002(\t\"]\n\rR", + "eadDataReply\022L\n\016normalizedNode\030\001 \002(\01324.o" + + "rg.opendaylight.controller.mdsal.Normali" + + "zedNodeXml\"\202\001\n\tWriteData\022\'\n\037instanceIden" + + "tifierPathArguments\030\001 \003(\t\022L\n\016normalizedN" + + "ode\030\002 \002(\01324.org.opendaylight.controller." + + "mdsal.NormalizedNodeXml\"\020\n\016WriteDataRepl" + + "yBU\n9org.opendaylight.controller.cluster" + + ".datastore.transactionB\030ShardTransaction" + "Messages"}; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_org_opendaylight_controller_mdsal_CloseTransaction_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_org_opendaylight_controller_mdsal_CloseTransaction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_CloseTransaction_descriptor, + new java.lang.String[] {}); + internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_descriptor, + new java.lang.String[] {}); + internal_static_org_opendaylight_controller_mdsal_CreateTransaction_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_org_opendaylight_controller_mdsal_CreateTransaction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_CreateTransaction_descriptor, + new java.lang.String[] {}); + internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_descriptor, + new java.lang.String[] {"TransactionPath",}); + internal_static_org_opendaylight_controller_mdsal_ReadyTransaction_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_org_opendaylight_controller_mdsal_ReadyTransaction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_ReadyTransaction_descriptor, + new java.lang.String[] {}); + internal_static_org_opendaylight_controller_mdsal_ReadyTransactionReply_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_org_opendaylight_controller_mdsal_ReadyTransactionReply_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_ReadyTransactionReply_descriptor, + new java.lang.String[] {"ActorPath",}); + internal_static_org_opendaylight_controller_mdsal_DeleteData_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_org_opendaylight_controller_mdsal_DeleteData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_DeleteData_descriptor, + new java.lang.String[] {"InstanceIdentifierPathArguments",}); + internal_static_org_opendaylight_controller_mdsal_DeleteDataReply_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_org_opendaylight_controller_mdsal_DeleteDataReply_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_DeleteDataReply_descriptor, + new java.lang.String[] {}); + internal_static_org_opendaylight_controller_mdsal_ReadData_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_org_opendaylight_controller_mdsal_ReadData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_ReadData_descriptor, + new java.lang.String[] {"InstanceIdentifierPathArguments",}); + internal_static_org_opendaylight_controller_mdsal_ReadDataReply_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_org_opendaylight_controller_mdsal_ReadDataReply_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_ReadDataReply_descriptor, + new java.lang.String[] {"NormalizedNode",}); + internal_static_org_opendaylight_controller_mdsal_WriteData_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_org_opendaylight_controller_mdsal_WriteData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_WriteData_descriptor, + new java.lang.String[] {"InstanceIdentifierPathArguments", + "NormalizedNode",}); + internal_static_org_opendaylight_controller_mdsal_WriteDataReply_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_org_opendaylight_controller_mdsal_WriteDataReply_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_opendaylight_controller_mdsal_WriteDataReply_descriptor, + new java.lang.String[] {}); + return null; + } + }; com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); + .internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] {org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage + .getDescriptor(),}, assigner); } // @@protoc_insertion_point(outer_class_scope) diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/util/EncoderDecoderUtil.java b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/util/EncoderDecoderUtil.java new file mode 100644 index 0000000000..9069e8f930 --- /dev/null +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/java/org/opendaylight/controller/cluster/datastore/util/EncoderDecoderUtil.java @@ -0,0 +1,190 @@ +package org.opendaylight.controller.cluster.datastore.util; + +import com.google.common.base.Preconditions; +import com.google.common.collect.Lists; +import org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage; +import org.opendaylight.yangtools.yang.common.QName; +import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; +import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; +import org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils; +import org.opendaylight.yangtools.yang.data.impl.schema.transform.dom.DomUtils; +import org.opendaylight.yangtools.yang.data.impl.schema.transform.dom.parser.DomToNormalizedNodeParserFactory; +import org.opendaylight.yangtools.yang.data.impl.schema.transform.dom.serializer.DomFromNormalizedNodeSerializerFactory; +import org.opendaylight.yangtools.yang.model.api.ChoiceNode; +import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode; +import org.opendaylight.yangtools.yang.model.api.DataNodeContainer; +import org.opendaylight.yangtools.yang.model.api.DataSchemaNode; +import org.opendaylight.yangtools.yang.model.api.Module; +import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.w3c.dom.Document; +import org.w3c.dom.Element; + +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.transform.OutputKeys; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.TransformerFactoryConfigurationError; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; +import java.io.ByteArrayInputStream; +import java.io.StringWriter; +import java.util.Collections; +import java.util.List; +import java.util.Set; + +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the Eclipse + * Public License v1.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +/* + * + * EncoderDecoderUtil helps in wrapping the NormalizedNode into a SimpleNormalizedNode + * protobuf message containing the XML representation of the NormalizeNode + * + * @author: syedbahm + */ +public class EncoderDecoderUtil { + static DocumentBuilderFactory factory; + static { + factory = DocumentBuilderFactory.newInstance(); + factory.setNamespaceAware(true); + factory.setCoalescing(true); + factory.setIgnoringElementContentWhitespace(true); + factory.setIgnoringComments(true); + } + + private static DataSchemaNode findChildNode(Set children, + String name) { + List containers = Lists.newArrayList(); + + for (DataSchemaNode dataSchemaNode : children) { + if (dataSchemaNode.getQName().getLocalName().equals(name)) + return dataSchemaNode; + if (dataSchemaNode instanceof DataNodeContainer) { + containers.add((DataNodeContainer) dataSchemaNode); + } else if (dataSchemaNode instanceof ChoiceNode) { + containers.addAll(((ChoiceNode) dataSchemaNode).getCases()); + } + } + + for (DataNodeContainer container : containers) { + DataSchemaNode retVal = findChildNode(container.getChildNodes(), name); + if (retVal != null) { + return retVal; + } + } + + return null; + } + + private static DataSchemaNode getSchemaNode(SchemaContext context, QName qname) { + + for (Module module : context.findModuleByNamespace(qname.getNamespace())) { + // we will take the first child as the start of the + if (module.getChildNodes() != null || !module.getChildNodes().isEmpty()) { + + DataSchemaNode found = + findChildNode(module.getChildNodes(), qname.getLocalName()); + return found; + } + } + return null; + } + + private static String toString(Element xml) { + try { + Transformer transformer = + TransformerFactory.newInstance().newTransformer(); + transformer.setOutputProperty(OutputKeys.INDENT, "yes"); + + StreamResult result = new StreamResult(new StringWriter()); + DOMSource source = new DOMSource(xml); + transformer.transform(source, result); + + return result.getWriter().toString(); + } catch (IllegalArgumentException | TransformerFactoryConfigurationError + | TransformerException e) { + throw new RuntimeException("Unable to serialize xml element " + xml, e); + } + } + + /** + * Helps in generation of NormalizedNodeXml message for the supplied NormalizedNode + * + * @param sc --SchemaContext + * @param normalizedNode -- Normalized Node to be encoded + * @return SimpleNormalizedNodeMessage.NormalizedNodeXml + */ + public static SimpleNormalizedNodeMessage.NormalizedNodeXml encode( + SchemaContext sc, NormalizedNode normalizedNode) { + Preconditions.checkArgument(sc != null, "Schema context found null"); + Preconditions.checkArgument(normalizedNode != null, + "normalized node found null"); + ContainerSchemaNode containerNode = + (ContainerSchemaNode) getSchemaNode(sc, normalizedNode.getIdentifier() + .getNodeType()); + Preconditions.checkState(containerNode != null, + "Couldn't find schema node for " + normalizedNode.getIdentifier()); + Iterable els = + DomFromNormalizedNodeSerializerFactory + .getInstance(XmlDocumentUtils.getDocument(), + DomUtils.defaultValueCodecProvider()) + .getContainerNodeSerializer() + .serialize(containerNode, (ContainerNode) normalizedNode); + String xmlString = toString(els.iterator().next()); + SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder builder = + SimpleNormalizedNodeMessage.NormalizedNodeXml.newBuilder(); + builder.setXmlString(xmlString); + builder.setNodeIdentifier(((ContainerNode) normalizedNode).getIdentifier() + .getNodeType().toString()); + return builder.build(); + + } + + /** + * Utilizes the SimpleNormalizedNodeMessage.NormalizedNodeXml to convert into NormalizedNode + * + * @param sc -- schema context + * @param normalizedNodeXml -- containing the normalized Node XML + * @return NormalizedNode return + * @throws Exception + */ + + public static NormalizedNode decode(SchemaContext sc, + SimpleNormalizedNodeMessage.NormalizedNodeXml normalizedNodeXml) + throws Exception { + Preconditions.checkArgument(sc != null, "schema context seems to be null"); + Preconditions.checkArgument(normalizedNodeXml != null, + "SimpleNormalizedNodeMessage.NormalizedNodeXml found to be null"); + QName qname = QName.create(normalizedNodeXml.getNodeIdentifier()); + + // here we will try to get back the NormalizedNode + ContainerSchemaNode containerSchemaNode = + (ContainerSchemaNode) getSchemaNode(sc, qname); + + // now we need to read the XML + + Document doc = + factory.newDocumentBuilder().parse( + new ByteArrayInputStream(normalizedNodeXml.getXmlString().getBytes( + "utf-8"))); + doc.getDocumentElement().normalize(); + + ContainerNode result = + DomToNormalizedNodeParserFactory + .getInstance(DomUtils.defaultValueCodecProvider()) + .getContainerNodeParser() + .parse(Collections.singletonList(doc.getDocumentElement()), + containerSchemaNode); + + return (NormalizedNode) result; + + } + + + +} diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/DataChangeListener.proto b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/DataChangeListener.proto new file mode 100644 index 0000000000..61f51418de --- /dev/null +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/DataChangeListener.proto @@ -0,0 +1,14 @@ +package org.opendaylight.controller.mdsal; + +import "SimpleNormalizedNode.proto"; + +option java_package = "org.opendaylight.controller.cluster.datastore.datachange.notification"; +option java_outer_classname = "DataChangeListenerMessages"; + +message DataChanged{ + repeated string instanceIdentifierPathArguments =1 ; + required NormalizedNodeXml normalizedNodeXml = 2; +} +message DataChangedReply{ + +} \ No newline at end of file diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/ShardTransaction.proto b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/ShardTransaction.proto index 0b260c8071..f22a6db84d 100644 --- a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/ShardTransaction.proto +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/ShardTransaction.proto @@ -1,5 +1,7 @@ package org.opendaylight.controller.mdsal; +import "SimpleNormalizedNode.proto"; + option java_package = "org.opendaylight.controller.cluster.datastore.transaction"; option java_outer_classname = "ShardTransactionMessages"; @@ -28,12 +30,26 @@ required string actorPath = 1; } message DeleteData { -required string instanceIdentifierPath = 1; +repeated string instanceIdentifierPathArguments = 1; } message DeleteDataReply{ } message ReadData { -required string intanceIdentifier=1; +required string instanceIdentifierPathArguments=1; +} + +message ReadDataReply{ + required NormalizedNodeXml normalizedNode=1; +} + +message WriteData { + repeated string instanceIdentifierPathArguments = 1; +required NormalizedNodeXml normalizedNode =2; + +} + +message WriteDataReply{ + } \ No newline at end of file diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/SimpleNormalizedNode.proto b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/SimpleNormalizedNode.proto new file mode 100644 index 0000000000..a1f35f19fb --- /dev/null +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/main/resources/SimpleNormalizedNode.proto @@ -0,0 +1,10 @@ +package org.opendaylight.controller.mdsal; + +option java_package = "org.opendaylight.controller.cluster.datastore.common"; +option java_outer_classname = "SimpleNormalizedNodeMessage"; + +message NormalizedNodeXml { + required string nodeIdentifier=1; + required string xmlString = 2; +} + diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/java/org/opendaylight/controller/cluster/datastore/messages/ShardManagerMessagesTest.java b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/java/org/opendaylight/controller/cluster/datastore/messages/ShardManagerMessagesTest.java index f57cfc9f10..353afe992c 100644 --- a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/java/org/opendaylight/controller/cluster/datastore/messages/ShardManagerMessagesTest.java +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/java/org/opendaylight/controller/cluster/datastore/messages/ShardManagerMessagesTest.java @@ -1,15 +1,12 @@ package org.opendaylight.controller.cluster.datastore.messages; /** - * This test case is present to ensure that if others have - * used proper version of protocol buffer. + * This test case is present to ensure that if others have used proper version of protocol buffer. * - * If a different version of protocol buffer is used then it would - * generate different java sources and would result in - * breaking of this test case. + * If a different version of protocol buffer is used then it would generate different java sources + * and would result in breaking of this test case. * - * @author: syedbahm - * Date: 6/20/14 + * @author: syedbahm Date: 6/20/14 * */ @@ -24,17 +21,19 @@ import java.io.FileOutputStream; public class ShardManagerMessagesTest { @Test - public void verifySerialization()throws Exception{ - ShardManagerMessages.FindPrimary.Builder builder = ShardManagerMessages.FindPrimary.newBuilder(); - builder.setShardName("Inventory"); - File testFile = new File("./test"); - FileOutputStream output = new FileOutputStream(testFile); - builder.build().writeTo(output); - output.close(); - - //Here we will read the same and check we got back what we had saved - ShardManagerMessages.FindPrimary findPrimary - = ShardManagerMessages.FindPrimary.parseFrom(new FileInputStream(testFile)); + public void verifySerialization() throws Exception { + ShardManagerMessages.FindPrimary.Builder builder = + ShardManagerMessages.FindPrimary.newBuilder(); + builder.setShardName("Inventory"); + File testFile = new File("./test"); + FileOutputStream output = new FileOutputStream(testFile); + builder.build().writeTo(output); + output.close(); + + // Here we will read the same and check we got back what we had saved + ShardManagerMessages.FindPrimary findPrimary = + ShardManagerMessages.FindPrimary + .parseFrom(new FileInputStream(testFile)); Assert.assertEquals("Inventory", findPrimary.getShardName()); testFile.delete(); diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/java/org/opendaylight/controller/cluster/datastore/util/NormalizedNodeXmlConverterTest.java b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/java/org/opendaylight/controller/cluster/datastore/util/NormalizedNodeXmlConverterTest.java new file mode 100644 index 0000000000..45e3ea5be3 --- /dev/null +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/java/org/opendaylight/controller/cluster/datastore/util/NormalizedNodeXmlConverterTest.java @@ -0,0 +1,502 @@ +/* + * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the terms of the Eclipse + * Public License v1.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.controller.cluster.datastore.util; + +import com.google.common.base.Preconditions; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; +import org.custommonkey.xmlunit.Diff; +import org.custommonkey.xmlunit.XMLUnit; +import org.junit.Test; +import org.opendaylight.controller.cluster.datastore.common.SimpleNormalizedNodeMessage; +import org.opendaylight.yangtools.yang.common.QName; +import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; +import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; +import org.opendaylight.yangtools.yang.data.api.schema.LeafNode; +import org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode; +import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode; +import org.opendaylight.yangtools.yang.data.api.schema.MapNode; +import org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils; +import org.opendaylight.yangtools.yang.data.impl.schema.Builders; +import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.CollectionNodeBuilder; +import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.DataContainerNodeBuilder; +import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuilder; +import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.NormalizedNodeBuilder; +import org.opendaylight.yangtools.yang.data.impl.schema.transform.dom.DomUtils; +import org.opendaylight.yangtools.yang.data.impl.schema.transform.dom.parser.DomToNormalizedNodeParserFactory; +import org.opendaylight.yangtools.yang.data.impl.schema.transform.dom.serializer.DomFromNormalizedNodeSerializerFactory; +import org.opendaylight.yangtools.yang.model.api.ChoiceNode; +import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode; +import org.opendaylight.yangtools.yang.model.api.DataNodeContainer; +import org.opendaylight.yangtools.yang.model.api.DataSchemaNode; +import org.opendaylight.yangtools.yang.model.api.Module; +import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.parser.impl.YangParserImpl; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.xml.sax.SAXException; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.OutputKeys; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.TransformerFactoryConfigurationError; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.StringWriter; +import java.net.URI; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * Two of the testcases in the yangtools/yang-data-impl are leveraged (with modification) to + * create the serialization of NormalizedNode using the ProtocolBuffer + * + * @syedbahm + * + */ + + +public class NormalizedNodeXmlConverterTest { + private static final Logger logger = LoggerFactory + .getLogger(NormalizedNodeXmlConverterTest.class); + public static final String NAMESPACE = + "urn:opendaylight:params:xml:ns:yang:controller:test"; + private static Date revision; + private ContainerNode expectedNode; + private ContainerSchemaNode containerNode; + private String xmlPath; + + static { + try { + revision = new SimpleDateFormat("yyyy-MM-dd").parse("2014-03-13"); + } catch (ParseException e) { + throw new RuntimeException(e); + } + } + + public static DataSchemaNode getSchemaNode(SchemaContext context, + String moduleName, String childNodeName) { + for (Module module : context.getModules()) { + if (module.getName().equals(moduleName)) { + DataSchemaNode found = + findChildNode(module.getChildNodes(), childNodeName); + Preconditions.checkState(found != null, "Unable to find %s", + childNodeName); + return found; + } + } + throw new IllegalStateException("Unable to find child node " + + childNodeName); + } + + static DataSchemaNode findChildNode(Set children, String name) { + List containers = Lists.newArrayList(); + + for (DataSchemaNode dataSchemaNode : children) { + if (dataSchemaNode.getQName().getLocalName().equals(name)) + return dataSchemaNode; + if (dataSchemaNode instanceof DataNodeContainer) { + containers.add((DataNodeContainer) dataSchemaNode); + } else if (dataSchemaNode instanceof ChoiceNode) { + containers.addAll(((ChoiceNode) dataSchemaNode).getCases()); + } + } + + for (DataNodeContainer container : containers) { + DataSchemaNode retVal = findChildNode(container.getChildNodes(), name); + if (retVal != null) { + return retVal; + } + } + + return null; + } + + private static InstanceIdentifier.NodeIdentifier getNodeIdentifier( + String localName) { + return new InstanceIdentifier.NodeIdentifier(new QName( + URI.create(NAMESPACE), revision, localName)); + } + + public static InstanceIdentifier.AugmentationIdentifier getAugmentIdentifier( + String... childNames) { + Set qn = Sets.newHashSet(); + + for (String childName : childNames) { + qn.add(getNodeIdentifier(childName).getNodeType()); + } + + return new InstanceIdentifier.AugmentationIdentifier(qn); + } + + + private static ContainerNode augmentChoiceExpectedNode() { + + DataContainerNodeBuilder b = + Builders.containerBuilder(); + b.withNodeIdentifier(getNodeIdentifier("container")); + + b.withChild(Builders + .choiceBuilder() + .withNodeIdentifier(getNodeIdentifier("ch2")) + .withChild( + Builders.leafBuilder() + .withNodeIdentifier(getNodeIdentifier("c2Leaf")).withValue("2") + .build()) + .withChild( + Builders + .choiceBuilder() + .withNodeIdentifier(getNodeIdentifier("c2DeepChoice")) + .withChild( + Builders + .leafBuilder() + .withNodeIdentifier( + getNodeIdentifier("c2DeepChoiceCase1Leaf2")) + .withValue("2").build()).build()).build()); + + b.withChild(Builders + .choiceBuilder() + .withNodeIdentifier(getNodeIdentifier("ch3")) + .withChild( + Builders.leafBuilder() + .withNodeIdentifier(getNodeIdentifier("c3Leaf")).withValue("3") + .build()).build()); + + b.withChild(Builders + .augmentationBuilder() + .withNodeIdentifier(getAugmentIdentifier("augLeaf")) + .withChild( + Builders.leafBuilder() + .withNodeIdentifier(getNodeIdentifier("augLeaf")) + .withValue("augment").build()).build()); + + b.withChild(Builders + .augmentationBuilder() + .withNodeIdentifier(getAugmentIdentifier("ch")) + .withChild( + Builders + .choiceBuilder() + .withNodeIdentifier(getNodeIdentifier("ch")) + .withChild( + Builders.leafBuilder() + .withNodeIdentifier(getNodeIdentifier("c1Leaf")) + .withValue("1").build()) + .withChild( + Builders + .augmentationBuilder() + .withNodeIdentifier( + getAugmentIdentifier("c1Leaf_AnotherAugment", + "deepChoice")) + .withChild( + Builders + .leafBuilder() + .withNodeIdentifier( + getNodeIdentifier("c1Leaf_AnotherAugment")) + .withValue("1").build()) + .withChild( + Builders + .choiceBuilder() + .withNodeIdentifier( + getNodeIdentifier("deepChoice")) + .withChild( + Builders + .leafBuilder() + .withNodeIdentifier( + getNodeIdentifier("deepLeafc1")) + .withValue("1").build()).build()) + .build()).build()).build()); + + return b.build(); + } + + + + public void init(String yangPath, String xmlPath, ContainerNode expectedNode) + throws Exception { + SchemaContext schema = parseTestSchema(yangPath); + this.xmlPath = xmlPath; + this.containerNode = + (ContainerSchemaNode) getSchemaNode(schema, "test", "container"); + this.expectedNode = expectedNode; + } + + SchemaContext parseTestSchema(String yangPath) throws Exception { + + YangParserImpl yangParserImpl = new YangParserImpl(); + InputStream stream = + NormalizedNodeXmlConverterTest.class.getResourceAsStream(yangPath); + ArrayList al = new ArrayList(); + al.add(stream); + Set modules = yangParserImpl.parseYangModelsFromStreams(al); + return yangParserImpl.resolveSchemaContext(modules); + + } + + + @Test + public void testConversionWithAugmentChoice() throws Exception { + init("/augment_choice.yang", "/augment_choice.xml", + augmentChoiceExpectedNode()); + Document doc = loadDocument(xmlPath); + + ContainerNode built = + DomToNormalizedNodeParserFactory + .getInstance(DomUtils.defaultValueCodecProvider()) + .getContainerNodeParser() + .parse(Collections.singletonList(doc.getDocumentElement()), + containerNode); + + if (expectedNode != null) + junit.framework.Assert.assertEquals(expectedNode, built); + + logger.info("{}", built); + + Iterable els = + DomFromNormalizedNodeSerializerFactory + .getInstance(XmlDocumentUtils.getDocument(), + DomUtils.defaultValueCodecProvider()) + .getContainerNodeSerializer().serialize(containerNode, built); + + Element el = els.iterator().next(); + + XMLUnit.setIgnoreWhitespace(true); + XMLUnit.setIgnoreComments(true); + + System.out.println(toString(doc.getDocumentElement())); + System.out.println(toString(el)); + + boolean diff = + new Diff( + XMLUnit.buildControlDocument(toString(doc.getDocumentElement())), + XMLUnit.buildTestDocument(toString(el))).similar(); + } + + private static ContainerNode listLeafListWithAttributes() { + DataContainerNodeBuilder b = + Builders.containerBuilder(); + b.withNodeIdentifier(getNodeIdentifier("container")); + + CollectionNodeBuilder listBuilder = + Builders.mapBuilder().withNodeIdentifier(getNodeIdentifier("list")); + + Map predicates = Maps.newHashMap(); + predicates.put(getNodeIdentifier("uint32InList").getNodeType(), 3L); + + DataContainerNodeBuilder list1Builder = + Builders.mapEntryBuilder().withNodeIdentifier( + new InstanceIdentifier.NodeIdentifierWithPredicates( + getNodeIdentifier("list").getNodeType(), predicates)); + NormalizedNodeBuilder> uint32InListBuilder = + Builders.leafBuilder().withNodeIdentifier( + getNodeIdentifier("uint32InList")); + + list1Builder.withChild(uint32InListBuilder.withValue(3L).build()); + + listBuilder.withChild(list1Builder.build()); + b.withChild(listBuilder.build()); + + NormalizedNodeBuilder> booleanBuilder = + Builders.leafBuilder().withNodeIdentifier(getNodeIdentifier("boolean")); + booleanBuilder.withValue(false); + b.withChild(booleanBuilder.build()); + + ListNodeBuilder> leafListBuilder = + Builders.leafSetBuilder().withNodeIdentifier( + getNodeIdentifier("leafList")); + + NormalizedNodeBuilder> leafList1Builder = + Builders.leafSetEntryBuilder().withNodeIdentifier( + new InstanceIdentifier.NodeWithValue(getNodeIdentifier("leafList") + .getNodeType(), "a")); + + leafList1Builder.withValue("a"); + + leafListBuilder.withChild(leafList1Builder.build()); + b.withChild(leafListBuilder.build()); + + return b.build(); + } + + + @Test + public void testConversionWithAttributes() throws Exception { + init("/test.yang", "/simple_xml_with_attributes.xml", + listLeafListWithAttributes()); + Document doc = loadDocument(xmlPath); + + ContainerNode built = + DomToNormalizedNodeParserFactory + .getInstance(DomUtils.defaultValueCodecProvider()) + .getContainerNodeParser() + .parse(Collections.singletonList(doc.getDocumentElement()), + containerNode); + + if (expectedNode != null) + junit.framework.Assert.assertEquals(expectedNode, built); + + logger.info("{}", built); + + Iterable els = + DomFromNormalizedNodeSerializerFactory + .getInstance(XmlDocumentUtils.getDocument(), + DomUtils.defaultValueCodecProvider()) + .getContainerNodeSerializer().serialize(containerNode, built); + + Element el = els.iterator().next(); + + XMLUnit.setIgnoreWhitespace(true); + XMLUnit.setIgnoreComments(true); + + System.out.println(toString(doc.getDocumentElement())); + System.out.println(toString(el)); + + boolean diff = + new Diff( + XMLUnit.buildControlDocument(toString(doc.getDocumentElement())), + XMLUnit.buildTestDocument(toString(el))).similar(); + } + + + private Document loadDocument(String xmlPath) throws Exception { + InputStream resourceAsStream = + NormalizedNodeXmlConverterTest.class.getResourceAsStream(xmlPath); + + Document currentConfigElement = readXmlToDocument(resourceAsStream); + Preconditions.checkNotNull(currentConfigElement); + return currentConfigElement; + } + + private static final DocumentBuilderFactory BUILDERFACTORY; + + static { + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + factory.setNamespaceAware(true); + factory.setCoalescing(true); + factory.setIgnoringElementContentWhitespace(true); + factory.setIgnoringComments(true); + BUILDERFACTORY = factory; + } + + private Document readXmlToDocument(InputStream xmlContent) + throws IOException, SAXException { + DocumentBuilder dBuilder; + try { + dBuilder = BUILDERFACTORY.newDocumentBuilder(); + } catch (ParserConfigurationException e) { + throw new RuntimeException("Failed to parse XML document", e); + } + Document doc = dBuilder.parse(xmlContent); + + doc.getDocumentElement().normalize(); + return doc; + } + + public static String toString(Element xml) { + try { + Transformer transformer = + TransformerFactory.newInstance().newTransformer(); + transformer.setOutputProperty(OutputKeys.INDENT, "yes"); + + StreamResult result = new StreamResult(new StringWriter()); + DOMSource source = new DOMSource(xml); + transformer.transform(source, result); + + return result.getWriter().toString(); + } catch (IllegalArgumentException | TransformerFactoryConfigurationError + | TransformerException e) { + throw new RuntimeException("Unable to serialize xml element " + xml, e); + } + } + + @Test + public void testConversionToNormalizedXml() throws Exception { + SimpleNormalizedNodeMessage.NormalizedNodeXml nnXml = + EncoderDecoderUtil.encode(parseTestSchema("/augment_choice.yang"), + augmentChoiceExpectedNode()); + Document expectedDoc = loadDocument("/augment_choice.xml"); + Document convertedDoc = + EncoderDecoderUtil.factory.newDocumentBuilder().parse( + new ByteArrayInputStream(nnXml.getXmlString().getBytes("utf-8"))); + System.out.println(toString(convertedDoc.getDocumentElement())); + XMLUnit.setIgnoreWhitespace(true); + XMLUnit.setIgnoreComments(true); + boolean diff = + new Diff(XMLUnit.buildControlDocument(toString(expectedDoc + .getDocumentElement())), + XMLUnit.buildTestDocument(toString(convertedDoc + .getDocumentElement()))).similar(); + System.out.println(toString(expectedDoc.getDocumentElement())); + + } + + + @Test + public void testConversionFromXmlToNormalizedNode() throws Exception { + SimpleNormalizedNodeMessage.NormalizedNodeXml nnXml = + EncoderDecoderUtil.encode(parseTestSchema("/test.yang"), + listLeafListWithAttributes()); + Document expectedDoc = loadDocument("/simple_xml_with_attributes.xml"); + Document convertedDoc = + EncoderDecoderUtil.factory.newDocumentBuilder().parse( + new ByteArrayInputStream(nnXml.getXmlString().getBytes("utf-8"))); + System.out.println(toString(convertedDoc.getDocumentElement())); + XMLUnit.setIgnoreWhitespace(true); + XMLUnit.setIgnoreComments(true); + boolean diff = + new Diff(XMLUnit.buildControlDocument(toString(expectedDoc + .getDocumentElement())), + XMLUnit.buildTestDocument(toString(convertedDoc + .getDocumentElement()))).similar(); + System.out.println(toString(expectedDoc.getDocumentElement())); + + // now we will try to convert xml back to normalize node. + ContainerNode cn = + (ContainerNode) EncoderDecoderUtil.decode( + parseTestSchema("/test.yang"), nnXml); + junit.framework.Assert.assertEquals(listLeafListWithAttributes(), cn); + + } + + @Test + public void testInMemoryTestModelProtoBuffEncoding() throws Exception { + + SimpleNormalizedNodeMessage.NormalizedNodeXml nnXml = + EncoderDecoderUtil.encode(parseTestSchema("/odl-datastore-test.yang"), + TestModel.createFamily()); + + Document convertedDoc = + EncoderDecoderUtil.factory.newDocumentBuilder().parse( + new ByteArrayInputStream(nnXml.getXmlString().getBytes("utf-8"))); + System.out.println(toString(convertedDoc.getDocumentElement())); + + // now we will try to convert xml back to normalize node. + ContainerNode cn = + (ContainerNode) EncoderDecoderUtil.decode( + parseTestSchema("/odl-datastore-test.yang"), nnXml); + junit.framework.Assert.assertEquals(TestModel.createFamily(), cn); + + + } +} diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/java/org/opendaylight/controller/cluster/datastore/util/TestModel.java b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/java/org/opendaylight/controller/cluster/datastore/util/TestModel.java new file mode 100644 index 0000000000..81878ba616 --- /dev/null +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/java/org/opendaylight/controller/cluster/datastore/util/TestModel.java @@ -0,0 +1,372 @@ +package org.opendaylight.controller.cluster.datastore.util; + +import org.opendaylight.yangtools.yang.common.QName; +import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; +import org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode; +import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; +import org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode; +import org.opendaylight.yangtools.yang.data.api.schema.LeafSetNode; +import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode; +import org.opendaylight.yangtools.yang.data.api.schema.MapNode; +import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; +import org.opendaylight.yangtools.yang.data.impl.schema.Builders; +import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; +import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.CollectionNodeBuilder; +import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.DataContainerNodeAttrBuilder; +import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.DataContainerNodeBuilder; +import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableContainerNodeBuilder; +import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableLeafSetEntryNodeBuilder; +import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableLeafSetNodeBuilder; +import org.opendaylight.yangtools.yang.model.api.Module; +import org.opendaylight.yangtools.yang.model.api.SchemaContext; +import org.opendaylight.yangtools.yang.parser.impl.YangParserImpl; + +import java.io.InputStream; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import static org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes.mapEntry; +import static org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes.mapEntryBuilder; +import static org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes.mapNodeBuilder; + +public class TestModel { + + public static final QName TEST_QNAME = QName.create( + "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:test", + "2014-03-13", "test"); + + public static final QName AUG_QNAME = QName.create( + "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:aug", + "2014-03-13", "name"); + + public static final QName DESC_QNAME = QName.create(TEST_QNAME, "desc"); + public static final QName OUTER_LIST_QNAME = QName.create(TEST_QNAME, + "outer-list"); + public static final QName INNER_LIST_QNAME = QName.create(TEST_QNAME, + "inner-list"); + public static final QName OUTER_CHOICE_QNAME = QName.create(TEST_QNAME, + "outer-choice"); + public static final QName ID_QNAME = QName.create(TEST_QNAME, "id"); + public static final QName NAME_QNAME = QName.create(TEST_QNAME, "name"); + public static final QName VALUE_QNAME = QName.create(TEST_QNAME, "value"); + private static final String DATASTORE_TEST_YANG = "/odl-datastore-test.yang"; + private static final String DATASTORE_AUG_YANG = + "/odl-datastore-augmentation.yang"; + private static final String DATASTORE_TEST_NOTIFICATION_YANG = + "/odl-datastore-test-notification.yang"; + + + public static final InstanceIdentifier TEST_PATH = InstanceIdentifier + .of(TEST_QNAME); + public static final InstanceIdentifier DESC_PATH = InstanceIdentifier + .builder(TEST_PATH).node(DESC_QNAME).build(); + public static final InstanceIdentifier OUTER_LIST_PATH = InstanceIdentifier + .builder(TEST_PATH).node(OUTER_LIST_QNAME).build(); + public static final QName TWO_QNAME = QName.create(TEST_QNAME, "two"); + public static final QName THREE_QNAME = QName.create(TEST_QNAME, "three"); + + private static final Integer ONE_ID = 1; + private static final Integer TWO_ID = 2; + private static final String TWO_ONE_NAME = "one"; + private static final String TWO_TWO_NAME = "two"; + private static final String DESC = "Hello there"; + + // Family specific constants + public static final QName FAMILY_QNAME = + QName + .create( + "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:notification-test", + "2014-04-15", "family"); + public static final QName CHILDREN_QNAME = QName.create(FAMILY_QNAME, + "children"); + public static final QName GRAND_CHILDREN_QNAME = QName.create(FAMILY_QNAME, + "grand-children"); + public static final QName CHILD_NUMBER_QNAME = QName.create(FAMILY_QNAME, + "child-number"); + public static final QName CHILD_NAME_QNAME = QName.create(FAMILY_QNAME, + "child-name"); + public static final QName GRAND_CHILD_NUMBER_QNAME = QName.create( + FAMILY_QNAME, "grand-child-number"); + public static final QName GRAND_CHILD_NAME_QNAME = QName.create(FAMILY_QNAME, + "grand-child-name"); + + public static final InstanceIdentifier FAMILY_PATH = InstanceIdentifier + .of(FAMILY_QNAME); + public static final InstanceIdentifier FAMILY_DESC_PATH = InstanceIdentifier + .builder(FAMILY_PATH).node(DESC_QNAME).build(); + public static final InstanceIdentifier CHILDREN_PATH = InstanceIdentifier + .builder(FAMILY_PATH).node(CHILDREN_QNAME).build(); + + private static final Integer FIRST_CHILD_ID = 1; + private static final Integer SECOND_CHILD_ID = 2; + + private static final String FIRST_CHILD_NAME = "first child"; + private static final String SECOND_CHILD_NAME = "second child"; + + private static final Integer FIRST_GRAND_CHILD_ID = 1; + private static final Integer SECOND_GRAND_CHILD_ID = 2; + + private static final String FIRST_GRAND_CHILD_NAME = "first grand child"; + private static final String SECOND_GRAND_CHILD_NAME = "second grand child"; + + // first child + private static final InstanceIdentifier CHILDREN_1_PATH = InstanceIdentifier + .builder(CHILDREN_PATH) + .nodeWithKey(CHILDREN_QNAME, CHILD_NUMBER_QNAME, FIRST_CHILD_ID) // + .build(); + private static final InstanceIdentifier CHILDREN_1_NAME_PATH = + InstanceIdentifier.builder(CHILDREN_PATH) + .nodeWithKey(CHILDREN_QNAME, CHILD_NAME_QNAME, FIRST_CHILD_NAME) // + .build(); + + private static final InstanceIdentifier CHILDREN_2_PATH = InstanceIdentifier + .builder(CHILDREN_PATH) + .nodeWithKey(CHILDREN_QNAME, CHILD_NUMBER_QNAME, SECOND_CHILD_ID) // + .build(); + private static final InstanceIdentifier CHILDREN_2_NAME_PATH = + InstanceIdentifier.builder(CHILDREN_PATH) + .nodeWithKey(CHILDREN_QNAME, CHILD_NAME_QNAME, SECOND_CHILD_NAME) // + .build(); + + + private static final InstanceIdentifier GRAND_CHILD_1_PATH = + InstanceIdentifier.builder(CHILDREN_1_PATH) + .node(GRAND_CHILDREN_QNAME) + // + .nodeWithKey(GRAND_CHILDREN_QNAME, GRAND_CHILD_NUMBER_QNAME, + FIRST_GRAND_CHILD_ID) // + .build(); + + private static final InstanceIdentifier GRAND_CHILD_1_NAME_PATH = + InstanceIdentifier.builder(CHILDREN_1_PATH) + .node(GRAND_CHILDREN_QNAME) + // + .nodeWithKey(GRAND_CHILDREN_QNAME, GRAND_CHILD_NAME_QNAME, + FIRST_GRAND_CHILD_NAME) // + .build(); + + private static final InstanceIdentifier GRAND_CHILD_2_PATH = + InstanceIdentifier.builder(CHILDREN_2_PATH) + .node(GRAND_CHILDREN_QNAME) + // + .nodeWithKey(GRAND_CHILDREN_QNAME, GRAND_CHILD_NUMBER_QNAME, + SECOND_GRAND_CHILD_ID) // + .build(); + + private static final InstanceIdentifier GRAND_CHILD_2_NAME_PATH = + InstanceIdentifier.builder(CHILDREN_2_PATH) + .node(GRAND_CHILDREN_QNAME) + // + .nodeWithKey(GRAND_CHILDREN_QNAME, GRAND_CHILD_NAME_QNAME, + SECOND_GRAND_CHILD_NAME) // + .build(); + + private static final InstanceIdentifier DESC_PATH_ID = InstanceIdentifier + .builder(DESC_PATH).build(); + private static final InstanceIdentifier OUTER_LIST_1_PATH = + InstanceIdentifier.builder(OUTER_LIST_PATH) + .nodeWithKey(OUTER_LIST_QNAME, ID_QNAME, ONE_ID) // + .build(); + + private static final InstanceIdentifier OUTER_LIST_2_PATH = + InstanceIdentifier.builder(OUTER_LIST_PATH) + .nodeWithKey(OUTER_LIST_QNAME, ID_QNAME, TWO_ID) // + .build(); + + private static final InstanceIdentifier TWO_TWO_PATH = InstanceIdentifier + .builder(OUTER_LIST_2_PATH).node(INNER_LIST_QNAME) // + .nodeWithKey(INNER_LIST_QNAME, NAME_QNAME, TWO_TWO_NAME) // + .build(); + + private static final InstanceIdentifier TWO_TWO_VALUE_PATH = + InstanceIdentifier.builder(TWO_TWO_PATH).node(VALUE_QNAME) // + .build(); + + private static final MapEntryNode BAR_NODE = mapEntryBuilder( + OUTER_LIST_QNAME, ID_QNAME, TWO_ID) // + .withChild(mapNodeBuilder(INNER_LIST_QNAME) // + .withChild(mapEntry(INNER_LIST_QNAME, NAME_QNAME, TWO_ONE_NAME)) // + .withChild(mapEntry(INNER_LIST_QNAME, NAME_QNAME, TWO_TWO_NAME)) // + .build()) // + .build(); + + public static final InputStream getDatastoreTestInputStream() { + return getInputStream(DATASTORE_TEST_YANG); + } + + public static final InputStream getDatastoreAugInputStream() { + return getInputStream(DATASTORE_AUG_YANG); + } + + public static final InputStream getDatastoreTestNotificationInputStream() { + return getInputStream(DATASTORE_TEST_NOTIFICATION_YANG); + } + + private static InputStream getInputStream(final String resourceName) { + return TestModel.class.getResourceAsStream(resourceName); + } + + public static SchemaContext createTestContext() { + List inputStreams = new ArrayList<>(); + inputStreams.add(getDatastoreTestInputStream()); + inputStreams.add(getDatastoreAugInputStream()); + inputStreams.add(getDatastoreTestNotificationInputStream()); + + YangParserImpl parser = new YangParserImpl(); + Set modules = parser.parseYangModelsFromStreams(inputStreams); + return parser.resolveSchemaContext(modules); + } + + /** + * Returns a test document + * + *
    +   * test
    +   *     outer-list
    +   *          id 1
    +   *     outer-list
    +   *          id 2
    +   *          inner-list
    +   *                  name "one"
    +   *          inner-list
    +   *                  name "two"
    +   *
    +   * 
    + * + * @return + */ + public static NormalizedNode createDocumentOne( + SchemaContext schemaContext) { + return ImmutableContainerNodeBuilder + .create() + .withNodeIdentifier( + new InstanceIdentifier.NodeIdentifier(schemaContext.getQName())) + .withChild(createTestContainer()).build(); + + } + + public static ContainerNode createTestContainer() { + + + final LeafSetEntryNode nike = + ImmutableLeafSetEntryNodeBuilder + .create() + .withNodeIdentifier( + new InstanceIdentifier.NodeWithValue(QName.create(TEST_QNAME, + "shoe"), "nike")).withValue("nike").build(); + final LeafSetEntryNode puma = + ImmutableLeafSetEntryNodeBuilder + .create() + .withNodeIdentifier( + new InstanceIdentifier.NodeWithValue(QName.create(TEST_QNAME, + "shoe"), "puma")).withValue("puma").build(); + final LeafSetNode shoes = + ImmutableLeafSetNodeBuilder + .create() + .withNodeIdentifier( + new InstanceIdentifier.NodeIdentifier(QName.create(TEST_QNAME, + "shoe"))).withChild(nike).withChild(puma).build(); + + + final LeafSetEntryNode five = + ImmutableLeafSetEntryNodeBuilder + .create() + .withNodeIdentifier( + (new InstanceIdentifier.NodeWithValue(QName.create(TEST_QNAME, + "number"), 5))).withValue(5).build(); + final LeafSetEntryNode fifteen = + ImmutableLeafSetEntryNodeBuilder + .create() + .withNodeIdentifier( + (new InstanceIdentifier.NodeWithValue(QName.create(TEST_QNAME, + "number"), 15))).withValue(15).build(); + final LeafSetNode numbers = + ImmutableLeafSetNodeBuilder + .create() + .withNodeIdentifier( + new InstanceIdentifier.NodeIdentifier(QName.create(TEST_QNAME, + "number"))).withChild(five).withChild(fifteen).build(); + + + Set childAugmentations = new HashSet<>(); + childAugmentations.add(AUG_QNAME); + final InstanceIdentifier.AugmentationIdentifier augmentationIdentifier = + new InstanceIdentifier.AugmentationIdentifier(null, childAugmentations); + final AugmentationNode augmentationNode = + Builders.augmentationBuilder() + .withNodeIdentifier(augmentationIdentifier) + .withChild(ImmutableNodes.leafNode(AUG_QNAME, "First Test")) + .build(); + return ImmutableContainerNodeBuilder + .create() + .withNodeIdentifier(new InstanceIdentifier.NodeIdentifier(TEST_QNAME)) + .withChild(ImmutableNodes.leafNode(DESC_QNAME, DESC)) + .withChild(augmentationNode) + .withChild(shoes) + .withChild(numbers) + .withChild( + mapNodeBuilder(OUTER_LIST_QNAME) + .withChild(mapEntry(OUTER_LIST_QNAME, ID_QNAME, ONE_ID)) + .withChild(BAR_NODE).build()).build(); + + } + + + public static ContainerNode createFamily() { + final DataContainerNodeAttrBuilder familyContainerBuilder = + ImmutableContainerNodeBuilder.create().withNodeIdentifier( + new InstanceIdentifier.NodeIdentifier(FAMILY_QNAME)); + + final CollectionNodeBuilder childrenBuilder = + mapNodeBuilder(CHILDREN_QNAME); + + final DataContainerNodeBuilder firstChildBuilder = + mapEntryBuilder(CHILDREN_QNAME, CHILD_NUMBER_QNAME, FIRST_CHILD_ID); + final DataContainerNodeBuilder secondChildBuilder = + mapEntryBuilder(CHILDREN_QNAME, CHILD_NUMBER_QNAME, SECOND_CHILD_ID); + + final DataContainerNodeBuilder firstGrandChildBuilder = + mapEntryBuilder(GRAND_CHILDREN_QNAME, GRAND_CHILD_NUMBER_QNAME, + FIRST_GRAND_CHILD_ID); + final DataContainerNodeBuilder secondGrandChildBuilder = + mapEntryBuilder(GRAND_CHILDREN_QNAME, GRAND_CHILD_NUMBER_QNAME, + SECOND_GRAND_CHILD_ID); + + firstGrandChildBuilder + .withChild( + ImmutableNodes.leafNode(GRAND_CHILD_NUMBER_QNAME, + FIRST_GRAND_CHILD_ID)).withChild( + ImmutableNodes.leafNode(GRAND_CHILD_NAME_QNAME, + FIRST_GRAND_CHILD_NAME)); + + secondGrandChildBuilder.withChild( + ImmutableNodes + .leafNode(GRAND_CHILD_NUMBER_QNAME, SECOND_GRAND_CHILD_ID)) + .withChild( + ImmutableNodes.leafNode(GRAND_CHILD_NAME_QNAME, + SECOND_GRAND_CHILD_NAME)); + + firstChildBuilder + .withChild(ImmutableNodes.leafNode(CHILD_NUMBER_QNAME, FIRST_CHILD_ID)) + .withChild(ImmutableNodes.leafNode(CHILD_NAME_QNAME, FIRST_CHILD_NAME)) + .withChild( + mapNodeBuilder(GRAND_CHILDREN_QNAME).withChild( + firstGrandChildBuilder.build()).build()); + + + secondChildBuilder + .withChild(ImmutableNodes.leafNode(CHILD_NUMBER_QNAME, SECOND_CHILD_ID)) + .withChild(ImmutableNodes.leafNode(CHILD_NAME_QNAME, SECOND_CHILD_NAME)) + .withChild( + mapNodeBuilder(GRAND_CHILDREN_QNAME).withChild( + firstGrandChildBuilder.build()).build()); + + childrenBuilder.withChild(firstChildBuilder.build()); + childrenBuilder.withChild(secondChildBuilder.build()); + + return familyContainerBuilder.withChild(childrenBuilder.build()).build(); + } + +} diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/resources/augment_choice.xml b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/resources/augment_choice.xml new file mode 100644 index 0000000000..c5a581cecc --- /dev/null +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/resources/augment_choice.xml @@ -0,0 +1,15 @@ + + + 2 + 2 + + + 3 + + augment + + 1 + 1 + 1 + + \ No newline at end of file diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/resources/augment_choice.yang b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/resources/augment_choice.yang new file mode 100644 index 0000000000..c2a57f667c --- /dev/null +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/resources/augment_choice.yang @@ -0,0 +1,109 @@ +// vi: set smarttab et sw=4 tabstop=4: +module test { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:controller:test"; + prefix "test"; + + organization "Cisco Systems, Inc."; + + revision "2014-3-13" { + description + "Initial revision"; + } + + + container container { + choice ch2{} + choice ch3{ + case c3 { + leaf c3Leaf { + type string; + } + } + } + } + + augment "/container/" { + leaf augLeaf { + type string; + } + } + + augment "/container/" { + choice ch{} + } + + augment "/container/ch/" { + case c1 { + leaf c1Leaf { + type string; + } + } + + leaf c12 { + type string; + } + } + augment "/container/ch/c1/" { + leaf c1Leaf_AnotherAugment { + type string; + } + + choice deepChoice{} + } + + augment "/container/ch3/" { + case c32 { + leaf c32Leaf { + type string; + } + } + + leaf c34LeafS { + type string; + } + } + + + augment "/container/ch/c1/deepChoice/" { + case deepCase1 { + leaf deepLeafc1 { + type string; + } + } + case deepCase2 { + leaf deepLeafc2 { + type string; + } + } + } + + augment "/container/ch2/" { + case c2 { + leaf c2Leaf { + type string; + } + + choice c2DeepChoice { + case c2DeepChoiceCase1 { + leaf c2DeepChoiceCase1Leaf1 { + type string; + } + } + case c2DeepChoiceCase2 { + leaf c2DeepChoiceCase1Leaf2 { + type string; + } + } + } + } + } + + augment "/container/ch2/" { + leaf c22Leaf { + type string; + } + } + + +} \ No newline at end of file diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/resources/odl-datastore-test.yang b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/resources/odl-datastore-test.yang new file mode 100644 index 0000000000..32ec2777ce --- /dev/null +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/resources/odl-datastore-test.yang @@ -0,0 +1,33 @@ +module odl-datastore-test { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:notification-test"; + prefix "notification-test-using-family-model"; + + revision "2014-04-15" { + description "Family structure created on "; + } + + container family { + leaf desc { + type string; + } + list children { + key child-number; + leaf child-number { + type uint16; + } + leaf child-name { + type string; + } + list grand-children { + key grand-child-number; + leaf grand-child-number { + type uint16; + } + leaf grand-child-name { + type string; + } + } + } + } +} \ No newline at end of file diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/resources/simple_xml_with_attributes.xml b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/resources/simple_xml_with_attributes.xml new file mode 100644 index 0000000000..0316d7a4a8 --- /dev/null +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/resources/simple_xml_with_attributes.xml @@ -0,0 +1,12 @@ + + + + 3 + + + false + + a + + \ No newline at end of file diff --git a/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/resources/test.yang b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/resources/test.yang new file mode 100644 index 0000000000..5f0e5000d1 --- /dev/null +++ b/opendaylight/md-sal/sal-protocolbuffer-encoding/src/test/resources/test.yang @@ -0,0 +1,225 @@ +// vi: set smarttab et sw=4 tabstop=4: +module test { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:controller:test"; + prefix "test"; + + organization "Cisco Systems, Inc."; + + revision "2014-3-13" { + description + "Initial revision"; + } + + grouping listGroup { + list list { + key "uint32InList"; + + leaf uint32InList { + type uint32; + } + + container containerInList{ + leaf uint32 { + type uint32; + } + leaf uint16 { + type uint16; + } + } + } + } + + grouping innerContainerGrouping { + container innerContainer { + leaf uint16 { + type uint16; + } + + container innerInnerContainer { + + leaf uint16 { + type uint16; + } + + leaf uint32 { + type uint32; + } + } + } + } + + container container { + leaf uint32 { + type uint32; + } + + leaf decimal64 { + type decimal64 { + fraction-digits 2; + } + } + + leaf boolean { + type boolean; + } + + leaf binary { + type binary; + } + + leaf string { + type string; + } + + uses listGroup { + augment "list/" { + leaf stringAugmentedToList{ + type string; + } + + choice choiceInList { + case caseInList1 { + leaf stringAugmentedToListInCase1 { + type string; + } + } + case caseInList2 { + leaf stringAugmentedToListInCase2 { + type string; + } + } + } + } + } + + list directList { + leaf stringInDirectList { + type string; + } + } + + uses innerContainerGrouping; + + choice choice{} + choice choice2{} + + leaf-list leafList { + type string; + } + + leaf identityRef { + type identityref { + base test-identity; + } + } + + /* TODO test modification with empty type + leaf empty { + type empty; + } + */ + } + + augment "/container/" { + leaf augmentUint32 { + type uint32; + } + } + + augment "/container/directList/" { + leaf augmentedString { + type uint32; + } + } + + augment "/container/choice/" { + case test-identity-augment { + when "/container/identityRef = 'test-identity'"; + leaf augmentString1 { + type string; + } + + leaf augmentInt1 { + type uint32; + } + } + case test-identity-augment2 { + when "/container/identityRef = 'test-identity2'"; + leaf augmentString2 { + type string; + } + + leaf augmentInt2 { + type uint32; + } + } + } + + augment "/container/choice/test-identity-augment/" { + + choice augmentedChoiceInCase { + + case augmentedCaseInAugmentedChoice { + leaf stringInAugmentedCaseInAugmentedChoice { + type string; + } + } + + case augmentedCaseInAugmentedChoice2 { + leaf stringInAugmentedCaseInAugmentedChoice2 { + type string; + } + } + } + } + + augment "/container/choice/test-identity-augment/augmentedChoiceInCase/" { + case augmentedCaseInAugmentedChoiceFromAugment { + leaf stringInAugmentedCaseInAugmentedChoiceFromAugment { + type string; + } + } + } + + augment "/container/choice2/" { + case test-identity-augment { + when "/container/identityRef = 'test-identity'"; + container augmentContainer { + leaf augmentStringInaugmentContainer { + type string; + } + } + } + case test-identity-augment2 { + when "/container/identityRef = 'test-identity2'"; + list augmentedList { + leaf augmentStringInaugmentList { + type string; + } + } + } + } + + + augment "/container/choice2/test-identity-augment2/augmentedList/" { + + container augmentedContainerInAugmentedListInAugmentedCase { + leaf-list leafInAugmentedContainerInAugmentedListInAugmentedCase { + type uint32; + } + } + + list augmentedListInAugmentedListInAugmentedCase { + leaf-list leafInAugmentedListInAugmentedListInAugmentedCase { + type uint32; + } + } + } + + identity test-identity {} + identity test-identity2 { + base test-identity; + } + +} \ No newline at end of file diff --git a/opendaylight/md-sal/statistics-manager/src/main/java/org/opendaylight/controller/md/statistics/manager/StatisticsRequestScheduler.java b/opendaylight/md-sal/statistics-manager/src/main/java/org/opendaylight/controller/md/statistics/manager/StatisticsRequestScheduler.java index 0ae33b8c71..29a27e2bb2 100644 --- a/opendaylight/md-sal/statistics-manager/src/main/java/org/opendaylight/controller/md/statistics/manager/StatisticsRequestScheduler.java +++ b/opendaylight/md-sal/statistics-manager/src/main/java/org/opendaylight/controller/md/statistics/manager/StatisticsRequestScheduler.java @@ -48,9 +48,13 @@ public class StatisticsRequestScheduler implements DataTransactionListener { private final TimerTask task = new TimerTask() { @Override public void run() { - long now = System.nanoTime(); - if(now > lastRequestTime+TimeUnit.MILLISECONDS.toNanos(REQUEST_MONITOR_INTERVAL)){ - requestStatistics(); + try{ + long now = System.nanoTime(); + if(now > lastRequestTime+TimeUnit.MILLISECONDS.toNanos(REQUEST_MONITOR_INTERVAL)){ + requestStatistics(); + } + }catch (IllegalArgumentException | IllegalStateException | NullPointerException e){ + srsLogger.warn("Exception occured while sending statistics request : {}",e); } } }; diff --git a/pom.xml b/pom.xml index c54d9a930f..012d9399b8 100644 --- a/pom.xml +++ b/pom.xml @@ -128,6 +128,7 @@ features/base features/controller + features/adsal opendaylight/dummy-console opendaylight/karaf-branding opendaylight/distribution/opendaylight-karaf