text:
package engine_test

import (
	"errors"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"github.com/pivotal-golang/lager"
	"github.com/pivotal-golang/lager/lagertest"

	"github.com/concourse/atc"
	"github.com/concourse/atc/db"
	dbfakes "github.com/concourse/atc/db/fakes"
	. "github.com/concourse/atc/engine"
	"github.com/concourse/atc/engine/fakes"
)

var _ = Describe("DBEngine", func() {
	var (
		fakeEngineA *fakes.FakeEngine
		fakeEngineB *fakes.FakeEngine
		fakeBuildDB *fakes.FakeBuildDB
		fakeLocker  *fakes.FakeBuildLocker

		dbEngine Engine
	)

	BeforeEach(func() {
		fakeEngineA = new(fakes.FakeEngine)
		fakeEngineA.NameReturns("fake-engine-a")

		fakeEngineB = new(fakes.FakeEngine)
		fakeEngineB.NameReturns("fake-engine-b")

		fakeBuildDB = new(fakes.FakeBuildDB)
		fakeLocker = new(fakes.FakeBuildLocker)

		dbEngine = NewDBEngine(Engines{fakeEngineA, fakeEngineB}, fakeBuildDB, fakeLocker)
	})

	Describe("CreateBuild", func() {
		var (
			build db.Build
			plan  atc.Plan

			createdBuild Build
			buildErr     error
		)

		BeforeEach(func() {
			build = db.Build{
				ID:   128,
				Name: "some-build",
			}

			plan = atc.Plan{
				Task: &atc.TaskPlan{
					Config: &atc.TaskConfig{
						Image: "some-image",

						Params: map[string]string{
							"FOO": "1",
							"BAR": "2",
						},

						Run: atc.TaskRunConfig{
							Path: "some-script",
							Args: []string{"arg1", "arg2"},
						},
					},
				},
			}

			fakeBuildDB.StartBuildReturns(true, nil)
		})

		JustBeforeEach(func() {
			createdBuild, buildErr = dbEngine.CreateBuild(build, plan)
		})

		Context("when creating the build succeeds", func() {
			var fakeBuild *fakes.FakeBuild

			BeforeEach(func() {
				fakeBuild = new(fakes.FakeBuild)
				fakeBuild.MetadataReturns("some-metadata")

				fakeEngineA.CreateBuildReturns(fakeBuild, nil)
			})

			It("succeeds", func() {
				Ω(buildErr).ShouldNot(HaveOccurred())
			})

			It("returns a build", func() {
				Ω(createdBuild).ShouldNot(BeNil())
			})

			It("starts the build in the database", func() {
				Ω(fakeBuildDB.StartBuildCallCount()).Should(Equal(1))

				buildID, engine, metadata := fakeBuildDB.StartBuildArgsForCall(0)
				Ω(buildID).Should(Equal(128))
				Ω(engine).Should(Equal("fake-engine-a"))
				Ω(metadata).Should(Equal("some-metadata"))
			})

			Context("when the build fails to transition to started", func() {
				BeforeEach(func() {
					fakeBuildDB.StartBuildReturns(false, nil)
				})

				It("aborts the build", func() {
					Ω(fakeBuild.AbortCallCount()).Should(Equal(1))
				})
			})
		})

		Context("when creating the build fails", func() {
			disaster := errors.New("failed")

			BeforeEach(func() {
				fakeEngineA.CreateBuildReturns(nil, disaster)
			})

			It("returns the error", func() {
				Ω(buildErr).Should(Equal(disaster))
			})

			It("does not start the build", func() {
				Ω(fakeBuildDB.StartBuildCallCount()).Should(Equal(0))
			})
		})
	})

	Describe("LookupBuild", func() {
		var (
			build db.Build

			foundBuild Build
			lookupErr  error
		)

		BeforeEach(func() {
			build = db.Build{
				ID:   128,
				Name: "some-build",
			}
		})

		JustBeforeEach(func() {
			foundBuild, lookupErr = dbEngine.LookupBuild(build)
		})

		It("succeeds", func() {
			Ω(lookupErr).ShouldNot(HaveOccurred())
		})

		It("returns a build", func() {
			Ω(foundBuild).ShouldNot(BeNil())
		})

		Describe("Abort", func() {
			var abortErr error

			JustBeforeEach(func() {
				abortErr = foundBuild.Abort()
			})

			Context("when acquiring the lock succeeds", func() {
				var fakeLock *dbfakes.FakeLock

				BeforeEach(func() {
					fakeLock = new(dbfakes.FakeLock)
					fakeLocker.AcquireWriteLockImmediatelyReturns(fakeLock, nil)
				})

				It("succeeds", func() {
					Ω(abortErr).ShouldNot(HaveOccurred())
				})

				It("marks the build as aborted", func() {
					Ω(fakeBuildDB.AbortBuildCallCount()).Should(Equal(1))
					Ω(fakeBuildDB.AbortBuildArgsForCall(0)).Should(Equal(build.ID))
				})
			})
		})
	})

	Describe("Builds", func() {
		var (
			build Build
			model db.Build
		)

		BeforeEach(func() {
			model = db.Build{
				ID: 128,

				Status: db.StatusStarted,
				Engine: "fake-engine-b",
			}

			var err error
			build, err = dbEngine.LookupBuild(model)
			Ω(err).ShouldNot(HaveOccurred())
		})

		Describe("Abort", func() {
			var abortErr error

			JustBeforeEach(func() {
				abortErr = build.Abort()
			})

			Context("when acquiring the lock succeeds", func() {
				var fakeLock *dbfakes.FakeLock

				BeforeEach(func() {
					fakeLock = new(dbfakes.FakeLock)
					fakeLocker.AcquireWriteLockImmediatelyReturns(fakeLock, nil)
				})

				Context("when the build is active", func() {
					BeforeEach(func() {
						model.Engine = "fake-engine-b"

						fakeBuildDB.GetBuildReturns(model, nil)

						fakeBuildDB.AbortBuildStub = func(int) error {
							Ω(fakeLocker.AcquireWriteLockImmediatelyCallCount()).Should(Equal(1))

							lockedBuild := fakeLocker.AcquireWriteLockImmediatelyArgsForCall(0)
							Ω(lockedBuild).Should(Equal([]db.NamedLock{db.BuildTrackingLock(model.ID)}))

							Ω(fakeLock.ReleaseCallCount()).Should(BeZero())

							return nil
						}
					})

					Context("when the engine build exists", func() {
						var realBuild *fakes.FakeBuild

						BeforeEach(func() {
							fakeBuildDB.GetBuildReturns(model, nil)

							realBuild = new(fakes.FakeBuild)
							fakeEngineB.LookupBuildReturns(realBuild, nil)
						})

						Context("when aborting the db build succeeds", func() {
							BeforeEach(func() {
								fakeBuildDB.AbortBuildReturns(nil)
							})

							It("succeeds", func() {
								Ω(abortErr).ShouldNot(HaveOccurred())
							})

							It("releases the lock", func() {
								Ω(fakeLock.ReleaseCallCount()).Should(Equal(1))
							})

							It("aborts the build via the db", func() {
								Ω(fakeBuildDB.AbortBuildCallCount()).Should(Equal(1))

								buildID := fakeBuildDB.AbortBuildArgsForCall(0)
								Ω(buildID).Should(Equal(model.ID))
							})

							It("aborts the real build", func() {
								Ω(realBuild.AbortCallCount()).Should(Equal(1))
							})
						})

						Context("when aborting the db build fails", func() {
							disaster := errors.New("oh no!")

							BeforeEach(func() {
								fakeBuildDB.AbortBuildReturns(disaster)
							})

							It("returns the error", func() {
								Ω(abortErr).Should(Equal(disaster))
							})

							It("does not abort the real build", func() {
								Ω(realBuild.AbortCallCount()).Should(BeZero())
							})

							It("releases the lock", func() {
								Ω(fakeLock.ReleaseCallCount()).Should(Equal(1))
							})
						})

						Context("when aborting the real build fails", func() {
							disaster := errors.New("oh no!")

							BeforeEach(func() {
								realBuild.AbortReturns(disaster)
							})

							It("returns the error", func() {
								Ω(abortErr).Should(Equal(disaster))
							})

							It("releases the lock", func() {
								Ω(fakeLock.ReleaseCallCount()).Should(Equal(1))
							})
						})
					})

					Context("when looking up the engine build fails", func() {
						disaster := errors.New("nope")

						BeforeEach(func() {
							fakeBuildDB.GetBuildReturns(model, nil)
							fakeEngineB.LookupBuildReturns(nil, disaster)
						})

						It("returns the error", func() {
							Ω(abortErr).Should(Equal(disaster))
						})

						It("releases the lock", func() {
							Ω(fakeLock.ReleaseCallCount()).Should(Equal(1))
						})
					})
				})

				Context("when the build is not yet active", func() {
					BeforeEach(func() {
						model.Engine = ""
						fakeBuildDB.GetBuildReturns(model, nil)
					})

					It("succeeds", func() {
						Ω(abortErr).ShouldNot(HaveOccurred())
					})

					It("aborts the build in the db", func() {
						Ω(fakeBuildDB.AbortBuildCallCount()).Should(Equal(1))

						buildID := fakeBuildDB.AbortBuildArgsForCall(0)
						Ω(buildID).Should(Equal(model.ID))
					})

					It("finishes the build in the db so that the aborted event is emitted", func() {
						Ω(fakeBuildDB.FinishBuildCallCount()).Should(Equal(1))

						buildID, status := fakeBuildDB.FinishBuildArgsForCall(0)
						Ω(buildID).Should(Equal(model.ID))
						Ω(status).Should(Equal(db.StatusAborted))
					})

					It("releases the lock", func() {
						Ω(fakeLock.ReleaseCallCount()).Should(Equal(1))
					})
				})
			})

			Context("when acquiring the lock fails", func() {
				BeforeEach(func() {
					fakeLocker.AcquireWriteLockImmediatelyReturns(nil, errors.New("no lock for you"))
				})

				Context("when aborting the build in the db succeeds", func() {
					BeforeEach(func() {
						fakeBuildDB.AbortBuildReturns(nil)
					})

					It("succeeds", func() {
						Ω(abortErr).ShouldNot(HaveOccurred())
					})

					It("aborts the build in the db", func() {
						Ω(fakeBuildDB.AbortBuildCallCount()).Should(Equal(1))
						Ω(fakeBuildDB.AbortBuildArgsForCall(0)).Should(Equal(model.ID))
					})

					It("does not abort the real build", func() {
						Ω(fakeBuildDB.GetBuildCallCount()).Should(BeZero())
						Ω(fakeEngineB.LookupBuildCallCount()).Should(BeZero())
					})
				})

				Context("when aborting the build in the db fails", func() {
					disaster := errors.New("oh no!")

					BeforeEach(func() {
						fakeBuildDB.AbortBuildReturns(disaster)
					})

					It("fails", func() {
						Ω(abortErr).Should(Equal(disaster))
					})
				})
			})
		})

		Describe("Resume", func() {
			var logger lager.Logger

			BeforeEach(func() {
				logger = lagertest.NewTestLogger("test")
			})

			JustBeforeEach(func() {
				build.Resume(logger)
			})

			Context("when acquiring the lock succeeds", func() {
				var fakeLock *dbfakes.FakeLock

				BeforeEach(func() {
					fakeLock = new(dbfakes.FakeLock)
					fakeLocker.AcquireWriteLockImmediatelyReturns(fakeLock, nil)
				})

				Context("when the build is active", func() {
					BeforeEach(func() {
						model.Engine = "fake-engine-b"
						fakeBuildDB.GetBuildReturns(model, nil)
					})

					Context("when the engine build exists", func() {
						var realBuild *fakes.FakeBuild

						BeforeEach(func() {
							fakeBuildDB.GetBuildReturns(model, nil)

							realBuild = new(fakes.FakeBuild)
							fakeEngineB.LookupBuildReturns(realBuild, nil)

							realBuild.ResumeStub = func(lager.Logger) {
								Ω(fakeLocker.AcquireWriteLockImmediatelyCallCount()).Should(Equal(1))

								lockedBuild := fakeLocker.AcquireWriteLockImmediatelyArgsForCall(0)
								Ω(lockedBuild).Should(Equal([]db.NamedLock{db.BuildTrackingLock(model.ID)}))

								Ω(fakeLock.ReleaseCallCount()).Should(BeZero())
							}
						})

						Context("when listening for aborts succeeds", func() {
							var (
								notifier *dbfakes.FakeNotifier
								abort    chan<- struct{}
							)

							BeforeEach(func() {
								aborts := make(chan struct{})
								abort = aborts

								notifier = new(dbfakes.FakeNotifier)
								notifier.NotifyReturns(aborts)

								fakeBuildDB.AbortNotifierReturns(notifier, nil)
							})

							It("listens for aborts", func() {
								Ω(fakeBuildDB.AbortNotifierCallCount()).Should(Equal(1))
								Ω(fakeBuildDB.AbortNotifierArgsForCall(0)).Should(Equal(model.ID))
							})

							It("resumes the build", func() {
								Ω(realBuild.ResumeCallCount()).Should(Equal(1))
							})

							It("releases the lock", func() {
								Ω(fakeLock.ReleaseCallCount()).Should(Equal(1))
							})

							It("closes the notifier", func() {
								Ω(notifier.CloseCallCount()).Should(Equal(1))
							})

							Context("when the build is aborted", func() {
								var errAborted = errors.New("aborted")

								BeforeEach(func() {
									aborted := make(chan error)

									realBuild.AbortStub = func() error {
										aborted <- errAborted
										return nil
									}

									realBuild.ResumeStub = func(lager.Logger) {
										<-aborted
									}

									close(abort)
								})

								It("aborts the build", func() {
									Ω(realBuild.AbortCallCount()).Should(Equal(1))
								})

								It("releases the lock", func() {
									Ω(fakeLock.ReleaseCallCount()).Should(Equal(1))
								})

								It("closes the notifier", func() {
									Ω(notifier.CloseCallCount()).Should(Equal(1))
								})
							})
						})

						Context("when listening for aborts fails", func() {
							disaster := errors.New("oh no!")

							BeforeEach(func() {
								fakeBuildDB.AbortNotifierReturns(nil, disaster)
							})

							It("does not resume the build", func() {
								Ω(realBuild.ResumeCallCount()).Should(BeZero())
							})

							It("releases the lock", func() {
								Ω(fakeLock.ReleaseCallCount()).Should(Equal(1))
							})
						})
					})

					Context("when looking up the engine build fails", func() {
						disaster := errors.New("nope")

						BeforeEach(func() {
							fakeBuildDB.GetBuildReturns(model, nil)
							fakeEngineB.LookupBuildReturns(nil, disaster)
						})

						It("releases the lock", func() {
							Ω(fakeLock.ReleaseCallCount()).Should(Equal(1))
						})

						It("marks the build as errored", func() {
							Ω(fakeBuildDB.FinishBuildCallCount()).Should(Equal(1))
							buildID, buildStatus := fakeBuildDB.FinishBuildArgsForCall(0)
							Ω(buildID).Should(Equal(model.ID))
							Ω(buildStatus).Should(Equal(db.StatusErrored))
						})
					})
				})

				Context("when the build's engine is unknown", func() {
					BeforeEach(func() {
						model.Engine = "bogus"
						fakeBuildDB.GetBuildReturns(model, nil)
					})

					It("marks the build as errored", func() {
						Ω(fakeBuildDB.FinishBuildCallCount()).Should(Equal(1))
						buildID, buildStatus := fakeBuildDB.FinishBuildArgsForCall(0)
						Ω(buildID).Should(Equal(model.ID))
						Ω(buildStatus).Should(Equal(db.StatusErrored))
					})
				})

				Context("when the build is not yet active", func() {
					BeforeEach(func() {
						model.Engine = ""
						fakeBuildDB.GetBuildReturns(model, nil)
					})

					It("does not look up the build in the engine", func() {
						Ω(fakeEngineB.LookupBuildCallCount()).Should(BeZero())
					})

					It("releases the lock", func() {
						Ω(fakeLock.ReleaseCallCount()).Should(Equal(1))
					})
				})

				Context("when the build has already finished", func() {
					BeforeEach(func() {
						model.Engine = "fake-engine-b"
						model.Status = db.StatusSucceeded
						fakeBuildDB.GetBuildReturns(model, nil)
					})

					It("does not look up the build in the engine", func() {
						Ω(fakeEngineB.LookupBuildCallCount()).Should(BeZero())
					})

					It("releases the lock", func() {
						Ω(fakeLock.ReleaseCallCount()).Should(Equal(1))
					})
				})
			})

			Context("when acquiring the lock fails", func() {
				BeforeEach(func() {
					fakeLocker.AcquireWriteLockImmediatelyReturns(nil, errors.New("no lock for you"))
				})

				It("does not look up the build", func() {
					Ω(fakeBuildDB.GetBuildCallCount()).Should(BeZero())
					Ω(fakeEngineB.LookupBuildCallCount()).Should(BeZero())
				})
			})
		})
	})
})

redpajama_set_name: RedPajamaGithub


text:
/* ------------------------------------------------------------------------------
	IMPORTANT!!  THIS FILE HAS BEEN ALTERED FROM THE Uni-Form 1.4 CSS.  IT IS
	A SPECIFIC IMPLEMENTATION OF Uni-Form CSS FOR USE WITH cfUniForm.

	http://www.quackfuzed.com/demos/cfUniForm/
   ------------------------------------------------------------------------------ */

/* #############################   GENERALS   ################################### */
/* ------------------------------------------------------------------------------ */

.uniForm{ margin: 0; padding: 0; position: relative; z-index: 1; } /* reset stuff */

  /* Some generals and more resets */
  .uniForm fieldset{ border: none; margin: 0; padding: 0; }
    .uniForm fieldset legend{ margin: 0; padding: 0; }

    /* This are the main units that contain form elements */
    .uniForm .ctrlHolder,
    .uniForm .buttonHolder{ margin: 0; padding: 0; clear: both; }

    /* Clear all floats */
    .uniForm:after,
      .uniForm .buttonHolder:after,
      .uniForm .ctrlHolder:after,
        .uniForm .ctrlHolder .multiField:after,
          .uniForm .inlineLabel:after{ content: "."; display: block; height: 0; line-height: 0; font-size: 0; clear: both; min-height: 0; visibility: hidden; }

      .uniForm label,
      .uniForm button{ cursor: pointer; }

/* ------------------------------------------------------------------------------ */
/* ##########################   DEFAULT LAYOUT   ################################ */
/* ------------------------------------------------------------------------------ */
/*       Styles for form controls where labels are above the input elements       */
/* ------------------------------------------------------------------------------ */

      .uniForm label,
      .uniForm .label{ display: block; float: none; margin: 0 0 .5em 0; padding: 0; line-height: 100%; width: auto; }

      /* Float the input elements */
      .uniForm .textInput,
      .uniForm .fileUpload,
      .uniForm .selectInput,
      .uniForm select,
      .uniForm textarea{ float: left; width: 53%; margin: 0; }

      /* Postition the hints */
      .uniForm .formHint{ float: right; width: 43%; margin: 0; clear: none; }

      /* Position the elements inside combo boxes (multiple inputs/selects/checkboxes/radio buttons per unit) */
      .uniForm .ctrlHolder ul{ float: left; width: 53%; margin: 0; padding: 0; }
        .uniForm .ctrlHolder ul li{ margin: 0 0 .5em 0; list-style: none; }
          .uniForm .ctrlHolder ul li label{ margin: 0; float: none; display: block; overflow: visible; }
        /* Alternate layout */
        .uniForm .ctrlHolder ul.alternate li{ float: left; width: 30%; margin-right: 3%; }
          .uniForm .ctrlHolder ul.alternate li label{ float: none; display: block; width: 98%; }
            .uniForm .ctrlHolder ul .textInput,
            .uniForm .ctrlHolder ul .selectInput,
            .uniForm .ctrlHolder ul select,
            .uniForm .ctrlHolder ul.alternate .textInput,
            .uniForm .ctrlHolder ul.alternate .selectInput,
            .uniForm .ctrlHolder ul.alternate select{ width: 98%; margin-top: .5em; display: block; float: none; }

        /* Required fields asterisk styling */
        .uniForm label em,
        .uniForm .label em{ float: left; width: 1em; margin: 0 0 0 -1em; }

/* ------------------------------------------------------------------------------ */
/* #########################   ALTERNATE LAYOUT   ############################### */
/* ------------------------------------------------------------------------------ */
/*    Styles for form controls where labels are in line with the input elements   */
/*    Set the class of the parent (preferably to a fieldset) to .inlineLabels     */
/* ------------------------------------------------------------------------------ */

      .uniForm .inlineLabels label,
      .uniForm .inlineLabels .label{ float: left; margin: .3em 2% 0 0; padding: 0; line-height: 1; position: relative; width: 32%; }

      /* Float the input elements */
      .uniForm .inlineLabels .textInput,
      .uniForm .inlineLabels .fileUpload,
      .uniForm .inlineLabels .selectInput,
      .uniForm .inlineLabels select,
      .uniForm .inlineLabels textarea{ float: left; width: 64%; }

    /* Postition the hints */
    .uniForm .inlineLabels .formHint{ clear: both; float: none; width: auto; margin-left: 34%; position: static; }

    /* Position the elements inside combo boxes (multiple inputs/selects/checkboxes/radio buttons per unit) */
    .uniForm .inlineLabels ul{ float: left; width: 66%; }
      .uniForm .inlineLabels ul li{ margin: .5em 0; }
        .uniForm .inlineLabels ul li label{ float: none; display: block; width: 100%; }
      /* Alternate layout */
      .uniForm .inlineLabels ul.alternate li{ margin-right: 3%; margin-top: .25em; }
          .uniForm .inlineLabels ul li label .textInput,
          .uniForm .inlineLabels ul li label textarea,
          .uniForm .inlineLabels ul li label select{ float: none; display: block; width: 98%;  }

    /* Required fields asterisk styling */
    .uniForm .inlineLabels label em,
    .uniForm .inlineLabels .label em{ display: block; float: none; margin: 0; position: absolute; right: 0; }

/* ----------------------------------------------------------------------------- */
/* ########################### Additional Stuff ################################ */
/* ----------------------------------------------------------------------------- */

  /* Generals */
    .uniForm legend{ color: inherit; }

      .uniForm .secondaryAction{ float: left; }

      /* .inlineLabel is used for inputs within labels - checkboxes and radio buttons */
      .uniForm .inlineLabel input,
      .uniForm .inlineLabels .inlineLabel input,
      .uniForm .blockLabels .inlineLabel input,
      /* class .inlineLabel is depreciated */
      .uniForm label input{ float: none; display: inline; margin: 0; padding: 0; border: none; }

      .uniForm .buttonHolder .inlineLabel,
      .uniForm .buttonHolder label{ float: left; margin: .5em 0 0 0; width: auto; max-width: 60%; text-align: left; }

      /* When you don't want to use a label */
      .uniForm .inlineLabels .noLabel ul{ margin-left: 34%; /* Match to width of label + gap to field */ }

      /* Classes for control of the widths of the fields */
      .uniForm .small { width: 30% !important; }
      .uniForm .medium{ width: 45% !important; }
      .uniForm .large {  } /* Large is default and should match the value you set for .textInput, textarea or select */
      .uniForm .auto  { width: auto !important; }
      .uniForm .small,
      .uniForm .medium,
      .uniForm .auto{ margin-right: 4px; }

/* Columns */
.uniForm .col{ float: left; }
.uniForm .col{ width: 50%; }

/* ----------------------------------------------------------------------------- */
/* ########################### cfUniForm Stuff ################################ */
/* ----------------------------------------------------------------------------- */
.uniForm input.hasDatePicker, .uniForm input.hasTimePicker, .uniForm input.hasTimestampPicker { width: 9em !important; }
.uniForm .inlineLabels label.checkboxLabel em { float: none; position: absolute; left: -2em; top: 0; }
/* css for timepicker */
.ui-timepicker-div .ui-widget-header{ margin-bottom: 8px; }
.ui-timepicker-div dl{ text-align: left; }
.ui-timepicker-div dl dt{ height: 25px; }
.ui-timepicker-div dl dd{ margin: -25px 0 10px 65px; }
.ui-timepicker-div td { font-size: 90%; }
/* cfu-fs-inner-wrap: this is a div that is added inside of each <fieldset> to provide hooks for things like jQuery accordion */
div.cfu-fs-inner-wrap {border:0 !important;margin:0 !important;padding:0 !important;}
/* default jQuery accordion rules */
legend.ui-accordion-header {width:100%;background:#fff;padding:8px 2px !important;}
legend.ui-accordion-header.ui-state-active {width:100%;background:#EFEFEF;padding:8px 2px !important;}
/* set the default max-height for textareas */
.resizableTextarea {max-height: 500px;}


text:
package org.pageseeder.diffx.algorithm;

import java.util.Arrays;

/**
 * Hold x-positions of end-points on a k-line.
 *
 * <q>
 * An array, V, contains the endpoints of the furthest reaching D-paths in elements V[- D], V[-D+ 2], . . . , V[D-2],
 * V[D]. By Lemma 1 this set of elements is disjoint from those where the endpoints of the (D+1)-paths will be stored
 * in the next iteration of the outer loop. Thus the array V can simultaneously hold the endpoints of the D-paths while
 * the (D+1)-path endpoints are being computed from them. Furthermore, to record an endpoint (x,y) in diagonal k it
 * suffices to retain just x because y is known to be x - k. Consequently, V is an array of integers where V[k] contains
 * the row index of the endpoint of a furthest reaching path in diagonal k.
 * </q>
 *
 * @author christophe Lauret
 * @version 0.9.0
 */
final class Vector {

  /**
   * Stores the actual x-position
   */
  private final int[] array;

  /**
   * Comparison direction flag
   */
  private final boolean isForward;

  /**
   * The maximum number of end points to store
   */
  private final int max;

  /**
   * Difference between length of A and B so that the k lines of the forward and reverse algorithms can be
   * computed correctly.
   */
  private int delta;

  /**
   * Private constructor
   */
  private Vector(int[] array, boolean forward, int max, int delta) {
    this.array = array;
    this.isForward = forward;
    this.max = max;
    this.delta = delta;
  }

  /**
   * Stores the x-position of an end point for a given k-line.
   *
   * @param k The k-line to store the position for
   * @param x The x-position of the end point
   */
  public void setX(int k, int x) {
    this.array[k - this.delta + this.max] = x;
  }

  /**
   * Returns the x-position for an end point for a given k-line
   *
   * @param k The k-line to recall the x-position for
   *
   * @return The x-position of an end point
   */
  public int getX(int k) {
    return this.array[k - this.delta + this.max];
  }

  /**
   * Create a new V array for the linear algorithm.
   *
   * @param m       The length of the first sequence
   * @param n       The length of the second sequence
   * @param forward The comparison direction; True if forward, false otherwise
   */
  public static Vector createLinear(int m, int n, boolean forward) {
    return create(m, n, forward, (m + n) / 2 + 1);
  }

  /**
   * Create a new V array for the greedy algorithm.
   *
   * @param m The length of the first sequence
   * @param n The length of the second sequence
   */
  public static Vector createGreedy(int m, int n) {
    return create(m, n, true, m + n);
  }

  /**
   * Initializes a new instance of this helper class.
   *
   * @param m       The length of the first sequence
   * @param n       The length of the second sequence
   * @param forward true if forward comparison; false otherwise
   * @param max     Maximum number of end points
   */
  public static Vector create(int m, int n, boolean forward, int max) {
    if (max <= 0) {
      max = 1;
    }
    int[] array = new int[2 * max + 1];
    Vector vector = new Vector(array, forward, max, 0);
    vector.init(m, n);
    return vector;
  }

  /**
   * Initializes the k-line based on the comparison direction.
   *
   * @param n The length of the first object to compare
   * @param m The length of the second object to compare
   */
  public void init(int n, int m) {
    if (this.isForward) {
      this.setX(1, 0);
    } else {
      this.delta = n - m;
      this.setX(n - m - 1, n);
    }
  }

  /**
   * Create a snapshot of V for D in forward direction (delta=0)
   */
  public Vector snapshot(int d) {
    return snapshot(d, true, 0);
  }

  /**
   * Create a snapshot of V
   *
   * @param d         Number of differences
   * @param isForward The comparison direction
   * @param delta     Difference in length between two sequences
   *
   * @return A copy of this object
   * @throws IllegalArgumentException If d > the maximum number of end points to store
   */
  public Vector snapshot(int d, boolean isForward, int delta) {
    assert !(isForward && delta != 0);
    if (d == 0) {
      d++;
    }
    if (d > this.max)
      throw new IllegalArgumentException("D cannot exceed the maximum number of end points");
    int[] array = new int[2 * d + 1];
    System.arraycopy(this.array, (this.max - this.delta) - (d - delta), array, 0, array.length);
    return new Vector(array, isForward, d, isForward ? 0 : delta);
  }

  @Override
  public String toString() {
    return "V " + this.array.length + " {" + (this.delta - this.max) + ".." + this.delta + ".." +
        (this.delta + this.max) + "} " + Arrays.toString(this.array);
  }
}


text:
import {Injectable} from "@angular/core";
import * as angular from "angular";
import "fattable";

import {DomainType} from "../../../services/DomainTypesService";
import {DataCategory} from "../../wrangler/column-delegate";
// import './cell-menu.template.scss';

/**
 * Default font.
 */
const DEFAULT_FONT = "10px ''SourceSansPro'";

/**
 * HTML template for header cells.
 */
const HEADER_TEMPLATE = "js/feed-mgr/visual-query/transform-data/visual-query-table/visual-query-table-header.html";

/**
 * Pixel unit.
 */
const PIXELS = "px";

@Injectable()
export class VisualQueryPainterService extends fattable.Painter {

    /**
     * Maximum display length for column context functions before they are ellipses (asthetics)
     */
    static readonly MAX_DISPLAY_LENGTH = 25;

    /**
     * Left and right padding for normal columns.
     */
    static readonly COLUMN_PADDING = 5;

    /**
     * Left padding for the first column.
     */
    static readonly COLUMN_PADDING_FIRST = 24;

    /**
     * Height of header row.
     */
    static readonly HEADER_HEIGHT = 56;

    /**
     * Height of data rows.
     */
    static readonly ROW_HEIGHT = 27;

    /**
     * Class for selected cells.
     */
    static readonly SELECTED_CLASS = "selected";

    /**
     * Visual Query Component instance.
     */
    private _delegate: any;

    /**
     * List of available domain types.
     */
    private _domainTypes: DomainType[];

    /**
     * Font for the header row
     */
    private _headerFont: string;

    /**
     * Font for the data rows
     */
    private _rowFont: string;

    /**
     * Panel containing the cell menu.
     */
    private menuPanel: angular.material.IPanelRef;

    /**
     * Indicates that the menu should be visible.
     */
    private menuVisible: boolean = false;

    /**
     * Cell that was last clicked.
     */
    private selectedCell: HTMLElement;

    /**
     * Panel containing the tooltip.
     */
    private tooltipPanel: angular.material.IPanelRef;

    /**
     * Indicates that the tooltip should be visible.
     */
    private tooltipVisible: boolean = false;

    /**
     * Indicate thate the header template has been loaded into the $templateCache
     * @type {boolean}
     */
    private headerTemplateLoaded : boolean = false;

    /**
     * Array of header div HTMLElements that are waiting for the HEADER_TEMPLATE to get loaded.
     * Once the template is loaded these elements will get filled
     * @type {any[]}
     */
    private waitingHeaderDivs : HTMLElement[] = [];

    private $compile: angular.ICompileService;
    private $mdPanel: angular.material.IPanelService;
    private $scope: angular.IRootScopeService;
    private $templateCache: angular.ITemplateCacheService;
    private $templateRequest: angular.ITemplateRequestService;
    private $timeout: angular.ITimeoutService;
    private $window: angular.IWindowService;

    /**
     * Constructs a {@code VisualQueryPainterService}.
     */
    constructor() {
        super();

        // Load AngularJS services
        const injector = angular.element(document.body).injector();
        this.$compile = injector.get("$compile");
        this.$mdPanel = injector.get("$mdPanel");
        this.$scope = injector.get("$rootScope");
        this.$templateCache = injector.get("$templateCache");
        this.$templateRequest = injector.get("$templateRequest");
        this.$timeout = injector.get("$timeout");
        this.$window = injector.get("$window");

        //Request the Header template and fill in the contents of any header divs waiting on the template.
        this.$templateRequest(HEADER_TEMPLATE).then((response) => {
            this.headerTemplateLoaded = true;
            angular.forEach(this.waitingHeaderDivs,(headerDiv : HTMLElement) => {
                this.compileHeader(headerDiv);
            });
            this.waitingHeaderDivs = [];
        });

        // Hide tooltip on scroll. Skip Angular change detection.
       /*
        window.addEventListener("scroll", () => {
            if (this.tooltipVisible) {
                this.hideTooltip();
            }
        }, {passive:true, capture:true});
    */
        // Create menu
        this.menuPanel = this.$mdPanel.create({
            animation: this.$mdPanel.newPanelAnimation().withAnimation({open: 'md-active md-clickable', close: 'md-leave'}),
            attachTo: angular.element(document.body),
            clickOutsideToClose: true,
            escapeToClose: true,
            focusOnOpen: true,
            panelClass: "_md md-open-menu-container md-whiteframe-z2 visual-query-menu",
            template: require("./cell-menu.template.html")
        });
        this.menuPanel.attach();

        // Create tooltip
        this.tooltipPanel = this.$mdPanel.create({
            animation: this.$mdPanel.newPanelAnimation().withAnimation({open: "md-show", close: "md-hide"}),
            attachTo: angular.element(document.body),
            template: `{{value}}<ul><li ng-repeat="item in validation">{{item.rule}}: {{item.reason}}</li></ul>`,
            focusOnOpen: false,
            panelClass: "md-tooltip md-origin-bottom visual-query-tooltip",
            propagateContainerEvents: true,
            zIndex: 100
        });
        this.tooltipPanel.attach();

    }

    /**
     * Gets the Visual Query Component for this painter.
     */
    get delegate(): any {
        return this._delegate;
    }

    set delegate(value: any) {
        this._delegate = value;
    }

    /**
     * Gets the list of available domain types.
     */
    get domainTypes(): DomainType[] {
        return this._domainTypes;
    }

    set domainTypes(value: DomainType[]) {
        this._domainTypes = value;
    }

    /**
     * Gets the font for the header row.
     */
    get headerFont() {
        return (this._headerFont != null) ? this._headerFont : DEFAULT_FONT;
    }

    set headerFont(value: string) {
        this._headerFont = value;
    }

    /**
     * Gets the font for the data rows.
     */
    get rowFont() {
        return (this._rowFont != null) ? this._rowFont : DEFAULT_FONT;
    }

    set rowFont(value: string) {
        this._rowFont = value;
    }

    fillCellPending(cellDiv: HTMLElement) {
        cellDiv.textContent = "Loading...";
        cellDiv.className = "pending";
    }

    fillHeaderPending(cellDiv: HTMLElement) {
        // Override so it doesn't replace our angular template for column cell
    }

    /**
     * Fills and style a cell div.
     *
     * @param {HTMLElement} cellDiv the cell
 element
     * @param {VisualQueryTableCell|null} cell the cell object
     */
    fillCell(cellDiv: HTMLElement, cell: any) {
        // Set style

        if (cell === null) {
            cellDiv.className = "";
        } else if (cell.validation) {
            $(cellDiv).addClass("invalid");
        } else if (cell.value === null) {
            cellDiv.className = "null";
        } else {
            cellDiv.className = "";
        }

        // Adjust padding based on column number
        if (cell !== null && cell.column === 0) {
            cellDiv.className += " first-column ";
        }

        // Set contents
        if (cell === null) {
            cellDiv.textContent = "";
        } else if (cell.value !== null && cell.value.sqltypeName && cell.value.sqltypeName.startsWith("PERIOD")) {
            cellDiv.textContent = "(" + cell.value.attributes.join(", ") + ")";
        } else {
            cellDiv.textContent = cell.value
        }

        if (cell !== null) {
            cellDiv.className += cellDiv.className + " " + (cell.row % 2 == 0 ? "even" : "odd");

            angular.element(cellDiv)
                .data("column", cell.column)
                .data("validation", cell.validation)
                .data("realValue", cell.value);
        }

        cellDiv.innerHTML = cellDiv.innerHTML.replace(/\s/g,"·");
    }

    /**
     * Fills and style a column div.
     *
     * @param {HTMLElement} headerDiv the header
 element
     * @param {VisualQueryTableHeader|null} header the column header
     */
    fillHeader(headerDiv: HTMLElement, header: any) {

        // Update scope in a separate thread
        const $scope: any = angular.element(headerDiv).scope();

        if (header != null && $scope.header !== header && header.delegate != undefined) {
            $scope.header = header;
            $scope.table = this.delegate;
            $scope.availableCasts = header.delegate.getAvailableCasts();
            $scope.availableDomainTypes = this.domainTypes;
            $scope.domainType = header.domainTypeId ? this.domainTypes.find((domainType: DomainType) => domainType.id === header.domainTypeId) : null;
            $scope.header.unsort = this.unsort.bind(this);
        }
    }

    /**
     * Hides the tooltip.
     */
    hideTooltip() {
        this.tooltipVisible = false;
        this.$timeout(() => {
            if (this.tooltipVisible === false) {
                this.tooltipPanel.hide();
            }
        }, 75);
    }

    /**
     * Setup method are called at the creation of the cells. That is during initialization and for all window resize event.
     *
     * Cells are recycled.
     *
     * @param {HTMLElement} cellDiv the cell
 element
     */
    setupCell(cellDiv: HTMLElement) {

        angular.element(cellDiv)
            .on("contextmenu", () => false)
            .on("mousedown", () => this.setSelected(cellDiv))
            .on("mouseenter", () => this.showTooltip(cellDiv))
            .on("mouseleave", () => this.hideTooltip())
            .on("mouseup", event => this.showMenu(cellDiv, event));

        cellDiv.style.font = this.rowFont;
        cellDiv.style.lineHeight = VisualQueryPainterService.ROW_HEIGHT + PIXELS;
    }

    /**
     * Setup method are called at the creation of the column header. That is during initialization and for all window resize event.
     *
     * Columns are recycled.
     *
     * @param {HTMLElement} headerDiv the header
 element
     */
    setupHeader(headerDiv: HTMLElement) {

        // Set style attributes
        headerDiv.style.font = this.headerFont;
        headerDiv.style.lineHeight = VisualQueryPainterService.HEADER_HEIGHT + PIXELS;
        //if the header template is not loaded yet then fill it with Loading text.
        // the callback on the templateRequest will compile those headers waiting
        if(!this.headerTemplateLoaded) {
            headerDiv.textContent = "Loading...";
            headerDiv.className = "pending";
            this.waitingHeaderDivs.push(headerDiv)
        }
        else {
            this.compileHeader(headerDiv);
        }

    }

    /**
     * Cleanup any events attached to the header
     * @param headerDiv
     */
    cleanUpHeader(headerDiv: HTMLElement){
        //destroy the old scope if it exists
        let oldScope = angular.element(headerDiv).isolateScope();
        if(angular.isDefined(oldScope)){
            oldScope.$destroy();
        }
    }

    /**
     * Cleanup any events attached to the cell
     * @param cellDiv
     */
    cleanUpCell(cellDiv: HTMLElement) {
       angular.element(cellDiv).unbind();
    }

    /**
     * Called when the table is refreshed
     * This should cleanup any events/bindings/scopes created by the prior render of the table
     * @param table
     */
    cleanUp(table:HTMLElement){
        //remove all header scopes
        this.headerScopes.forEach((headerScope: IScope) => {
            headerScope.$destroy();
        });
        this.headerScopes = [];

        super.cleanUp(table);
        angular.element(table).unbind();
    }
    private headerScopes : IScope[] = []

    private compileHeader(headerDiv: HTMLElement) {
        // Load template
        headerDiv.innerHTML = this.$templateCache.get(HEADER_TEMPLATE) as string;

        let newScope = this.$scope.$new(true)
        this.headerScopes.push(newScope);
        this.$compile(headerDiv)(newScope);

    }

    /**
     * Hides the cell menu.
     */
    private hideMenu() {
        this.menuVisible = false;
        this.$timeout(() => {
            if (this.menuVisible === false) {
                this.menuPanel.close();
            }
        }, 75);
    }

    /**
     * Sets the currently selected cell.
     */
    private setSelected(cellDiv: HTMLElement) {
        // Remove previous selection
        if (this.selectedCell) {
            angular.element(this.selectedCell).removeClass(VisualQueryPainterService.SELECTED_CLASS);
        }

        // Set new selection
        this.selectedCell = cellDiv;
        angular.element(this.selectedCell).addClass(VisualQueryPainterService.SELECTED_CLASS);
    }

    /**
     * Create the display string for a selection
     */
    private niceSelection(selection:string) : string {
        switch (selection) {
            case ' ':
                return '(space)';
            case '':
                return '(empty)';
            case null:
                return '(empty)';
            default:
                return selection;
        }
    }

    // Replace dots in the
    private cleanDots(value: string) : string {
        return value.replace(/·/g, " ");
    }
    /**
     * Shows the cell menu on the specified cell.
     */
    private showMenu(cellDiv: HTMLElement, event: JQueryEventObject) {
        // Get column info
        const cell = angular.element(cellDiv);
        const column = cell.data("column");
        const header = this.delegate.columns[column];
        const isNull = cell.hasClass("null");
        const selection = this.$window.getSelection();

        if (event.button != 0 || !(selection.focusNode.nodeType == 3 || selection.toString() == "") || !(this.selectedCell == event.target || $.contains(this.selectedCell, event.target))) {
            return;
        }

        //if (this.selectedCell !== event.target || (selection.anchorNode !== null && selection.anchorNode !== selection.focusNode)) {
        //    return;  // ignore dragging between elements
       // }
        if (angular.element(document.body).children(".CodeMirror-hints").length > 0) {
            return;  // ignore clicks when CodeMirror function list is active
        } else if (header.delegate.dataCategory === DataCategory.DATETIME || header.delegate.dataCategory === DataCategory.NUMERIC || header.delegate.dataCategory === DataCategory.STRING) {
            this.menuVisible = true;
        } else {
            return;  // ignore clicks on columns with unsupported data types
        }

        // Update content

        // Calculate the actual offset considering the inner spans
        let trueOffset = function(selection:any) {
            let offset = selection.anchorOffset;
            let node = ( selection.anchorNode.parentNode.className === 'ws-text' ? selection.anchorNode.parentElement : selection.anchorNode);
            while (node.previousSibling) {
                node = node.previousSibling;
                offset += node.textContent.length;
            }
            return offset;
        }

        const $scope: IScope = (this.menuPanel.config as any).scope;
        $scope.DataCategory = DataCategory;
        $scope.header = header;
        $scope.selection = this.cleanDots(selection.toString()); //(header.delegate.dataCategory === DataCategory.STRING) ? cleanDots(selection.toString()) : null;
        let startOffset = trueOffset(selection);
        $scope.range = (selection != null ? { startOffset: startOffset, endOffset: startOffset+$scope.selection.length } : null);
        $scope.selectionDisplay = this.niceSelection($scope.selection)
        $scope.table = this.delegate;
        $scope.value = isNull ? null : $(cellDiv).data('realValue');
        $scope.displayValue = (isNull || $scope.value == null ? "(empty)" : ($scope.value.length > VisualQueryPainterService.MAX_DISPLAY_LENGTH ? $scope.value.substring(0, VisualQueryPainterService.MAX_DISPLAY_LENGTH) + "...": $scope.value));

        // Update position
        this.menuPanel.updatePosition(
            this.$mdPanel.newPanelPosition()
                .left(event.clientX + PIXELS)
                .top(event.clientY + PIXELS)
        );

        // Show menu
        this.menuPanel.open()
            .then(() => {
                // Add click listener
                this.menuPanel.panelEl.on("click", "button", () => this.hideMenu());

                // Calculate position
                const element = angular.element(this.menuPanel.panelEl);
                const height = element.height();
                const offset = element.offset();
                const width = element.width();

                // Fix position if off screen
                const left = (offset.left + width > this.$window.innerWidth) ? this.$window.innerWidth - width - 8 : event.clientX;
                const top = (offset.top + height > this.$window.innerHeight) ? this.$window.innerHeight - height - 8 : event.clientY;
                if (left !== event.clientX || top !== event.clientY) {
                    this.menuPanel.updatePosition(
                        this.$mdPanel.newPanelPosition()
                            .left(left + PIXELS)
                            .top(top + PIXELS)
                    );
                }
            });
    }

   /**
     * Shows the tooltip on the specified cell.
     */
    private showTooltip(cellDiv: HTMLElement) {
        this.tooltipVisible = true;

        // Update content
        const $scope = this.tooltipPanel.panelEl.scope() as any;
        $scope.validation = angular.element(cellDiv).data("validation");
        $scope.value = cellDiv.innerText;

        if ($scope.value && $scope.value.length > 22) {

            // Update position
            const cellOffset = angular.element(cellDiv).offset();
            let offsetY;
            let yPosition;

            if (cellOffset.top + VisualQueryPainterService.ROW_HEIGHT * 3 > this.$window.innerHeight) {
                offsetY = "-27" + PIXELS;
                yPosition = this.$mdPanel.yPosition.ABOVE;
            } else {
                offsetY = "0";
                yPosition = this.$mdPanel.yPosition.BELOW;
            }

            this.tooltipPanel.updatePosition(
                this.$mdPanel.newPanelPosition()
                    .relativeTo(cellDiv)
                    .addPanelPosition(this.$mdPanel.xPosition.ALIGN_START, yPosition)
                    .withOffsetX("28px")
                    .withOffsetY(offsetY)
            );

            // Show tooltip
            this.tooltipPanel.open();
        } else {
            this.hideTooltip();
        }
    }

    /**
     * Turns off sorting.
     */
    private unsort() {
        if (this.delegate) {
            this.delegate.unsort();
        }
    }
}


text:
package org.apache.geode.distributed.internal;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

import org.junit.Test;
import org.junit.experimental.categories.Category;

import org.apache.geode.test.junit.categories.UnitTest;

@Category(UnitTest.class)
public class ReplyProcessor21Test {

  @Test
  public void shouldBeMockable() throws Exception {
    ReplyProcessor21 mockReplyProcessor21 = mock(ReplyProcessor21.class);

    mockReplyProcessor21.waitForRepliesUninterruptibly();
    mockReplyProcessor21.finished();

    verify(mockReplyProcessor21, times(1)).waitForRepliesUninterruptibly();
    verify(mockReplyProcessor21, times(1)).finished();
  }
}


text:
/* see https://github.com/postcss/postcss-custom-media */

/* breakpoints inspired by https://tailwindcss.com/docs/responsive-design */
@custom-media --min-s (min-width: 640px);
@custom-media --min-m (min-width: 768px);
@custom-media --min-l (min-width: 1024px);
@custom-media --min-xl (min-width: 1280px);
@custom-media --min-xxl (min-width: 1536px);


text:
layout: post
microblog: true
date: 2017-06-04 04:11 +0300
guid: http://desparoz.micro.blog/2017/06/04/seems-like-a.html
---
Seems like a really sizeable portion of the people I follow in blogs, micro.blog and on Twitter are in transit to WWDC


text:
package siia.booking.domain.flight;

import org.joda.time.DateTime;

/**
 * @author Jonas Partner
 */
public class FlightQuote {

    private final DateTime bookingDateTime;

    private final Flight flight;

    public FlightQuote(DateTime bookingDateTime, Flight flight) {
        this.bookingDateTime = bookingDateTime;
        this.flight = flight;
    }

    public DateTime getBookingDateTime() {
        return bookingDateTime;
    }

    public Flight getFlight() {
        return flight;
    }
}


text:
package com.alachisoft.tayzgrid.common.protobuf;

public final class InitializeCacheResponseProtocol {
  private InitializeCacheResponseProtocol() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public static final class InitializeCacheResponse extends
      com.google.protobuf.GeneratedMessage {
    // Use InitializeCacheResponse.newBuilder() to construct.
    private InitializeCacheResponse() {
      initFields();
    }
    private InitializeCacheResponse(boolean noInit) {}

    private static final InitializeCacheResponse defaultInstance;
    public static InitializeCacheResponse getDefaultInstance() {
      return defaultInstance;
    }

    public InitializeCacheResponse getDefaultInstanceForType() {
      return defaultInstance;
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.internal_static_com_alachisoft_tayzgrid_common_protobuf_InitializeCacheResponse_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.internal_static_com_alachisoft_tayzgrid_common_protobuf_InitializeCacheResponse_fieldAccessorTable;
    }

    // optional string cacheType = 1;
    public static final int CACHETYPE_FIELD_NUMBER = 1;
    private boolean hasCacheType;
    private java.lang.String cacheType_ = "";
    public boolean hasCacheType() { return hasCacheType; }
    public java.lang.String getCacheType() { return cacheType_; }

    // optional string targetCacheUniqueID = 2;
    public static final int TARGETCACHEUNIQUEID_FIELD_NUMBER = 2;
    private boolean hasTargetCacheUniqueID;
    private java.lang.String targetCacheUniqueID_ = "";
    public boolean hasTargetCacheUniqueID() { return hasTargetCacheUniqueID; }
    public java.lang.String getTargetCacheUniqueID() { return targetCacheUniqueID_; }

    // optional bool isPersistenceEnabled = 3;
    public static final int ISPERSISTENCEENABLED_FIELD_NUMBER = 3;
    private boolean hasIsPersistenceEnabled;
    private boolean isPersistenceEnabled_ = false;
    public boolean hasIsPersistenceEnabled() { return hasIsPersistenceEnabled; }
    public boolean getIsPersistenceEnabled() { return isPersistenceEnabled_; }

    // optional int32 persistenceInterval = 4;
    public static final int PERSISTENCEINTERVAL_FIELD_NUMBER = 4;
    private boolean hasPersistenceInterval;
    private int persistenceInterval_ = 0;
    public boolean hasPersistenceInterval() { return hasPersistenceInterval; }
    public int getPersistenceInterval() { return persistenceInterval_; }

    // optional bool isShutDownProcessEnabled = 5;
    public static final int ISSHUTDOWNPROCESSENABLED_FIELD_NUMBER = 5;
    private boolean hasIsShutDownProcessEnabled;
    private boolean isShutDownProcessEnabled_ = false;
    public boolean hasIsShutDownProcessEnabled() { return hasIsShutDownProcessEnabled; }
    public boolean getIsShutDownProcessEnabled() { return isShutDownProcessEnabled_; }

    // repeated .com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfo shutDownServerInfo = 6;
    public static final int SHUTDOWNSERVERINFO_FIELD_NUMBER = 6;
    private java.util.List<com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.ShutDownServerInfo> shutDownServerInfo_ =
      java.util.Collections.emptyList();
    public java.util.List<com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.ShutDownServerInfo> getShutDownServerInfoList() {
      return shutDownServerInfo_;
    }
    public int getShutDownServerInfoCount() { return shutDownServerInfo_.size(); }
    public com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.ShutDownServerInfo getShutDownServerInfo(int index) {
      return shutDownServerInfo_.get(index);
    }

    // optional int32 expirationType = 7;
    public static final int EXPIRATIONTYPE_FIELD_NUMBER = 7;
    private boolean hasExpirationType;
    private int expirationType_ = 0;
    public boolean hasExpirationType() { return hasExpirationType; }
    public int getExpirationType() { return expirationType_; }

    // optional int64 duration = 8;
    public static final int DURATION_FIELD_NUMBER = 8;
    private boolean hasDuration;
    private long duration_ = 0L;
    public boolean hasDuration() { return hasDuration; }
    public long getDuration() { return duration_; }

    // optional int32 expirationUnit = 9;
    public static final int EXPIRATIONUNIT_FIELD_NUMBER = 9;
    private boolean hasExpirationUnit;
    private int expirationUnit_ = 0;
    public boolean hasExpirationUnit() { return hasExpirationUnit; }
    public int getExpirationUnit() { return expirationUnit_; }

    private void initFields() {
    }
    public final boolean isInitialized() {
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (hasCacheType()) {
        output.writeString(1, getCacheType());
      }
      if (hasTargetCacheUniqueID()) {
        output.writeString(2, getTargetCacheUniqueID());
      }
      if (hasIsPersistenceEnabled()) {
        output.writeBool(3, getIsPersistenceEnabled());
      }
      if (hasPersistenceInterval()) {
        output.writeInt32(4, getPersistenceInterval());
      }
      if (hasIsShutDownProcessEnabled()) {
        output.writeBool(5, getIsShutDownProcessEnabled());
      }
      for (com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.ShutDownServerInfo element : getShutDownServerInfoList()) {
        output.writeMessage(6, element);
      }
      if (hasExpirationType()) {
        output.writeInt32(7, getExpirationType());
      }
      if (hasDuration()) {
        output.writeInt64(8, getDuration());
      }
      if (hasExpirationUnit()) {
        output.writeInt32(9, getExpirationUnit());
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (hasCacheType()) {
        size += com.google.protobuf.CodedOutputStream
          .computeStringSize(1, getCacheType());
      }
      if (hasTargetCacheUniqueID()) {
        size += com.google.protobuf.CodedOutputStream
          .computeStringSize(2, getTargetCacheUniqueID());
      }
      if (hasIsPersistenceEnabled()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(3, getIsPersistenceEnabled());
      }
      if (hasPersistenceInterval()) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(4, getPersistenceInterval());
      }
      if (hasIsShutDownProcessEnabled()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(5, getIsShutDownProcessEnabled());
      }
      for (com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.ShutDownServerInfo element : getShutDownServerInfoList()) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(6, element);
      }
      if (hasExpirationType()) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(7, getExpirationType());
      }
      if (hasDuration()) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(8, getDuration());
      }
      if (hasExpirationUnit()) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(9, getExpirationUnit());
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    public static com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> {
      private com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse result;

      // Construct using com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse.newBuilder()
      private Builder() {}

      private static Builder create() {
        Builder builder = new Builder();
        builder.result = new com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse();
        return builder;
      }

      protected com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse internalGetResult() {
        return result;
      }

      public Builder clear() {
        if (result == null) {
          throw new IllegalStateException(
            "Cannot call clear() after build().");
        }
        result = new com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse();
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(result);
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse.getDescriptor();
      }

      public com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse getDefaultInstanceForType() {
        return com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse.getDefaultInstance();
      }

      public boolean isInitialized() {
        return result.isInitialized();
      }
      public com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse build() {
        if (result != null && !isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return buildPartial();
      }

      private com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        if (!isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return buildPartial();
      }

      public com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse buildPartial() {
        if (result == null) {
          throw new IllegalStateException(
            "build() has already been called on this Builder.");
        }
        if (result.shutDownServerInfo_ != java.util.Collections.EMPTY_LIST) {
          result.shutDownServerInfo_ =
            java.util.Collections.unmodifiableList(result.shutDownServerInfo_);
        }
        com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse returnMe = result;
        result = null;
        return returnMe;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse) {
          return mergeFrom((com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse other) {
        if (other == com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse.getDefaultInstance()) return this;
        if (other.hasCacheType()) {
          setCacheType(other.getCacheType());
        }
        if (other.hasTargetCacheUniqueID()) {
          setTargetCacheUniqueID(other.getTargetCacheUniqueID());
        }
        if (other.hasIsPersistenceEnabled()) {
          setIsPersistenceEnabled(other.getIsPersistenceEnabled());
        }
        if (other.hasPersistenceInterval()) {
          setPersistenceInterval(other.getPersistenceInterval());
        }
        if (other.hasIsShutDownProcessEnabled()) {
          setIsShutDownProcessEnabled(other.getIsShutDownProcessEnabled());
        }
        if (!other.shutDownServerInfo_.isEmpty()) {
          if (result.shutDownServerInfo_.isEmpty()) {
            result.shutDownServerInfo_ = new java.util.ArrayList<com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.ShutDownServerInfo>();
          }
          result.shutDownServerInfo_.addAll(other.shutDownServerInfo_);
        }
        if (other.hasExpirationType()) {
          setExpirationType(other.getExpirationType());
        }
        if (other.hasDuration()) {
          setDuration(other.getDuration());
        }
        if (other.hasExpirationUnit()) {
          setExpirationUnit(other.getExpirationUnit());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                return this;
              }
              break;
            }
            case 10: {
              setCacheType(input.readString());
              break;
            }
            case 18: {
              setTargetCacheUniqueID(input.readString());
              break;
            }
            case 24: {
              setIsPersistenceEnabled(input.readBool());
              break;
            }
            case 32: {
              setPersistenceInterval(input.readInt32());
              break;
            }
            case 40: {
              setIsShutDownProcessEnabled(input.readBool());
              break;
            }
            case 50: {
              com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.ShutDownServerInfo.Builder subBuilder = com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.ShutDownServerInfo.newBuilder();
              input.readMessage(subBuilder, extensionRegistry);
              addShutDownServerInfo(subBuilder.buildPartial());
              break;
            }
            case 56: {
              setExpirationType(input.readInt32());
              break;
            }
            case 64: {
              setDuration(input.readInt64());
              break;
            }
            case 72: {
              setExpirationUnit(input.readInt32());
              break;
            }
          }
        }
      }

      // optional string cacheType = 1;
      public boolean hasCacheType() {
        return result.hasCacheType();
      }
      public java.lang.String getCacheType() {
        return result.getCacheType();
      }
      public Builder setCacheType(java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  result.hasCacheType = true;
        result.cacheType_ = value;
        return this;
      }
      public Builder clearCacheType() {
        result.hasCacheType = false;
        result.cacheType_ = getDefaultInstance().getCacheType();
        return this;
      }

      // optional string targetCacheUniqueID = 2;
      public boolean hasTargetCacheUniqueID() {
        return result.hasTargetCacheUniqueID();
      }
      public java.lang.String getTargetCacheUniqueID() {
        return result.getTargetCacheUniqueID();
      }
      public Builder setTargetCacheUniqueID(java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  result.hasTargetCacheUniqueID = true;
        result.targetCacheUniqueID_ = value;
        return this;
      }
      public Builder clearTargetCacheUniqueID() {
        result.hasTargetCacheUniqueID = false;
        result.targetCacheUniqueID_ = getDefaultInstance().getTargetCacheUniqueID();
        return this;
      }

      // optional bool isPersistenceEnabled = 3;
      public boolean hasIsPersistenceEnabled() {
        return result.hasIsPersistenceEnabled();
      }
      public boolean getIsPersistenceEnabled() {
        return result.getIsPersistenceEnabled();
      }
      public Builder setIsPersistenceEnabled(boolean value) {
        result.hasIsPersistenceEnabled = true;
        result.isPersistenceEnabled_ = value;
        return this;
      }
      public Builder clearIsPersistenceEnabled() {
        result.hasIsPersistenceEnabled = false;
        result.isPersistenceEnabled_ = false;
        return this;
      }

      // optional int32 persistenceInterval = 4;
      public boolean hasPersistenceInterval() {
        return result.hasPersistenceInterval();
      }
      public int getPersistenceInterval() {
        return result.getPersistenceInterval();
      }
      public Builder setPersistenceInterval(int value) {
        result.hasPersistenceInterval = true;
        result.persistenceInterval_ = value;
        return this;
      }
      public Builder clearPersistenceInterval() {
        result.hasPersistenceInterval = false;
        result.persistenceInterval_ = 0;
        return this;
      }

      // optional bool isShutDownProcessEnabled = 5;
      public boolean hasIsShutDownProcessEnabled() {
        return result.hasIsShutDownProcessEnabled();
      }
      public boolean getIsShutDownProcessEnabled() {
        return result.getIsShutDownProcessEnabled();
      }
      public Builder setIsShutDownProcessEnabled(boolean value) {
        result.hasIsShutDownProcessEnabled = true;
        result.isShutDownProcessEnabled_ = value;
        return this;
      }
      public Builder clearIsShutDownProcessEnabled() {
        result.hasIsShutDownProcessEnabled = false;
        result.isShutDownProcessEnabled_ = false;
        return this;
      }

      // repeated .com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfo shutDownServerInfo = 6;
      public java.util.List<com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.ShutDownServerInfo> getShutDownServerInfoList() {
        return java.util.Collections.unmodifiableList(result.shutDownServerInfo_);
      }
      public int getShutDownServerInfoCount() {
        return result.getShutDownServerInfoCount();
      }
      public com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.ShutDownServerInfo getShutDownServerInfo(int index) {
        return result.getShutDownServerInfo(index);
      }
      public Builder setShutDownServerInfo(int index, com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.ShutDownServerInfo value) {
        if (value == null) {
          throw new NullPointerException();
        }
        result.shutDownServerInfo_.set(index, value);
        return this;
      }
      public Builder setShutDownServerInfo(int index, com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.ShutDownServerInfo.Builder builderForValue) {
        result.shutDownServerInfo_.set(index, builderForValue.build());
        return this;
      }
      public Builder addShutDownServerInfo(com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.ShutDownServerInfo value) {
        if (value == null) {
          throw new NullPointerException();
        }
        if (result.shutDownServerInfo_.isEmpty()) {
          result.shutDownServerInfo_ = new java.util.ArrayList<com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.ShutDownServerInfo>();
        }
        result.shutDownServerInfo_.add(value);
        return this;
      }
      public Builder addShutDownServerInfo(com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.ShutDownServerInfo.Builder builderForValue) {
        if (result.shutDownServerInfo_.isEmpty()) {
          result.shutDownServerInfo_ = new java.util.ArrayList<com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.ShutDownServerInfo>();
        }
        result.shutDownServerInfo_.add(builderForValue.build());
        return this;
      }
      public Builder addAllShutDownServerInfo(
          java.lang.Iterable<? extends com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.ShutDownServerInfo> values) {
        if (result.shutDownServerInfo_.isEmpty()) {
          result.shutDownServerInfo_ = new java.util.ArrayList<com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.ShutDownServerInfo>();
        }
        super.addAll(values, result.shutDownServerInfo_);
        return this;
      }
      public Builder clearShutDownServerInfo() {
        result.shutDownServerInfo_ = java.util.Collections.emptyList();
        return this;
      }

      // optional int32 expirationType = 7;
      public boolean hasExpirationType() {
        return result.hasExpirationType();
      }
      public int getExpirationType() {
        return result.getExpirationType();
      }
      public Builder setExpirationType(int value) {
        result.hasExpirationType = true;
        result.expirationType_ = value;
        return this;
      }
      public Builder clearExpirationType() {
        result.hasExpirationType = false;
        result.expirationType_ = 0;
        return this;
      }

      // optional int64 duration = 8;
      public boolean hasDuration() {
        return result.hasDuration();
      }
      public long getDuration() {
        return result.getDuration();
      }
      public Builder setDuration(long value) {
        result.hasDuration = true;
        result.duration_ = value;
        return this;
      }
      public Builder clearDuration() {
        result.hasDuration = false;
        result.duration_ = 0L;
        return this;
      }

      // optional int32 expirationUnit = 9;
      public boolean hasExpirationUnit() {
        return result.hasExpirationUnit();
      }
      public int getExpirationUnit() {
        return result.getExpirationUnit();
      }
      public Builder setExpirationUnit(int value) {
        result.hasExpirationUnit = true;
        result.expirationUnit_ = value;
        return this;
      }
      public Builder clearExpirationUnit() {
        result.hasExpirationUnit = false;
        result.expirationUnit_ = 0;
        return this;
      }

      // @@protoc_insertion_point(builder_scope:com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponse)
    }

    static {
      defaultInstance = new InitializeCacheResponse(true);
      com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.internalForceInit();
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponse)
  }

  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_com_alachisoft_tayzgrid_common_protobuf_InitializeCacheResponse_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_com_alachisoft_tayzgrid_common_protobuf_InitializeCacheResponse_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\035InitializeCacheResponse.proto\022\'com.ala" +
      "chisoft.tayzgrid.common.protobuf\032\030ShutDo" +
      "wnServerInfo.proto\"\301\002\n\027InitializeCacheRe" +
      "sponse\022\021\n\tcacheType\030\001 \001(\t\022\033\n\023targetCache" +
      "UniqueID\030\002 \001(\t\022\034\n\024isPersistenceEnabled\030\003" +
      " \001(\010\022\033\n\023persistenceInterval\030\004 \001(\005\022 \n\030isS" +
      "hutDownProcessEnabled\030\005 \001(\010\022W\n\022shutDownS" +
      "erverInfo\030\006 \003(\0132;.com.alachisoft.tayzgri" +
      "d.common.protobuf.ShutDownServerInfo\022\026\n\016" +
      "expirationType\030\007 \001(\005\022\020\n\010duration\030\010 \001(\003\022\026",
      "\n\016expirationUnit\030\t \001(\005B!B\037InitializeCach" +
      "eResponseProtocol"
    };
    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_com_alachisoft_tayzgrid_common_protobuf_InitializeCacheResponse_descriptor =
            getDescriptor().getMessageTypes().get(0);
          internal_static_com_alachisoft_tayzgrid_common_protobuf_InitializeCacheResponse_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_com_alachisoft_tayzgrid_common_protobuf_InitializeCacheResponse_descriptor,
              new java.lang.String[] { "CacheType", "TargetCacheUniqueID", "IsPersistenceEnabled", "PersistenceInterval", "IsShutDownProcessEnabled", "ShutDownServerInfo", "ExpirationType", "Duration", "ExpirationUnit", },
              com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse.class,
              com.alachisoft.tayzgrid.common.protobuf.InitializeCacheResponseProtocol.InitializeCacheResponse.Builder.class);
          return null;
        }
      };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
          com.alachisoft.tayzgrid.common.protobuf.ShutDownServerInfoProtocol.getDescriptor(),
        }, assigner);
  }

  public static void internalForceInit() {}

  // @@protoc_insertion_point(outer_class_scope)
}