and all relevant pairings must be defined in advance.</p></div><dlclass="attributes block"><dt>Source</dt><dd><ahref="https://github.com/psforever/PSF-LoginServer/blob/master//home/runner/work/PSF-LoginServer/PSF-LoginServer/src/main/scala/net/psforever/services/CavernRotationService.scala"target="_blank">CavernRotationService.scala</a></dd><dt>See also</dt><dd><spanclass="cmt"><p><code>ActorContext</code></p></span><spanclass="cmt"><p><code>Building</code></p></span><spanclass="cmt"><p><code>ChatMsg</code></p></span><spanclass="cmt"><p><code>Config.app.game.cavernRotation</code></p></span><spanclass="cmt"><p><code>GalaxyService</code></p></span><spanclass="cmt"><p><code>GalaxyAction.LockedZoneUpdate</code></p></span><spanclass="cmt"><p><code>GalaxyResponse.UnlockedZoneUpdate</code></p></span><spanclass="cmt"><p><code>InterstellarClusterService</code></p></span><spanclass="cmt"><p><code>org.log4s.getLogger</code></p></span><spanclass="cmt"><p><code>resources/zonemaps/lattice.json</code></p></span><spanclass="cmt"><p><code>SessionActor</code></p></span><spanclass="cmt"><p><code>SessionActor.SendResponse</code></p></span><spanclass="cmt"><p><code>StashBuffer</code></p></span><spanclass="cmt"><p><code>WarpGate</code></p></span><spanclass="cmt"><p><code>Zone</code></p></span><spanclass="cmt"><p><code>ZoneForcedCavernConnectionsMessage</code></p></span><spanclass="cmt"><p><code>ZoneInfoMessage</code></p></span></dd></dl><divclass="toggleContainer"><divclass="toggle block"><span>Linear Supertypes</span><divclass="superTypes hiddenContent"><spanname="scala.AnyRef"class="extype">AnyRef</span>, <spanname="scala.Any"class="extype">Any</span></div></div></div></div><divid="mbrsel"><divclass="toggle"></div><divid="memberfilter"><iclass="material-icons arrow"></i><spanclass="input"><inputplaceholder="Filter all members"id="mbrsel-input"type="text"accesskey="/"/></span><iclass="clear material-icons"></i></div><divid="filterby"><divid="order"><spanclass="filtertype">Ordering</span><ol><liclass="alpha in"><span>Alphabetic</span></li><liclass="inherit out"><span>By Inheritance</span></li></ol></div><divclass="ancestors"><spanclass="filtertype">Inherited<br/></span><olid="linearization"><liclass="in"name="net.psforever.services.CavernRotationService"><span>CavernRotationService</span></li><liclass="in"name="scala.AnyRef"><span>AnyRef</span></li><liclass="in"name="scala.Any"><span>Any</span></li></ol></div><divclass="ancestors"><spanclass="filtertype"></span><ol><liclass="hideall out"><span>Hide All</span></li><liclass="showall in"><span>Show All</span></li></ol></div><divid="visbl"><spanclass="filtertype">Visibility</span><ol><liclass="public in"><span>Public</span></li><liclass="protected out"><span>Protected</span></li></ol></div></div></div><divid="template"><divid="allMembers"><divid="constructors"class="members"><h3>Instance Constructors</h3><ol><liclass="indented0 "name="net.psforever.services.CavernRotationService#<init>"group="Ungrouped"fullComment="no"data-isabs="false"visbl="pub"><aid="<init>(context:akka.actor.typed.scaladsl.ActorContext[net.psforever.services.CavernRotationService.Command],buffer:akka.actor.typed.scaladsl.StashBuffer[net.psforever.services.CavernRotationService.Command]):net.psforever.services.CavernRotationService"class="anchorToMember"></a><aid="<init>:CavernRotationService"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../net/psforever/services/CavernRotationService.html#<init>(context:akka.actor.typed.scaladsl.ActorContext[net.psforever.services.CavernRotationService.Command],buffer:akka.actor.typed.scaladsl.StashBuffer[net.psforever.services.CavernRotationService.Command]):net.psforever.services.CavernRotationService"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">new</span></span><spanclass="symbol"><spanclass="name">CavernRotationService</span><spanclass="params">(<spanname="context">
If the time until the next rotation is greater than the time where the cavern closing warning would be displayed,
progress to that final cavern closing warning.</p><divclass="fullcomment"><divclass="comment cmt"><p>Progress to the next significant cavern rotation event.<br>
<br>
If the time until the next rotation is greater than the time where the cavern closing warning would be displayed,
progress to that final cavern closing warning.
Adjust the timing for that advancement.
If the final cavern closing warning was already displayed,
just perform the cavern rotation.</p></div><dlclass="paramcmts block"><dtclass="param">galaxyService</dt><ddclass="cmt"><p>callback to update the server and clients;
should be the reference to <code>GalaxyService</code>, hence the literal name</p></dd><dtclass="param">forcedRotationOverride</dt><ddclass="cmt"><p>force a cavern rotation in a case where a closing warning would be displayed instead</p></dd></dl><dlclass="attributes block"><dt>See also</dt><dd><spanclass="cmt"><p><code>GalaxyService</code></p></span></dd></dl></div></li><liclass="indented0 "name="net.psforever.services.CavernRotationService#hurryRotationToZoneLock"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="pub"><aid="hurryRotationToZoneLock(zoneid:String,galaxyService:akka.actor.ActorRef):Boolean"class="anchorToMember"></a><aid="hurryRotationToZoneLock(String,ActorRef):Boolean"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../net/psforever/services/CavernRotationService.html#hurryRotationToZoneLock(zoneid:String,galaxyService:akka.actor.ActorRef):Boolean"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">def</span></span><spanclass="symbol"><spanclass="name">hurryRotationToZoneLock</span><spanclass="params">(<spanname="zoneid">zoneid: <spanname="scala.Predef.String"class="extype">String</span></span>, <spanname="galaxyService">galaxyService: <spanname="akka.actor.ActorRef"class="extype">ActorRef</span></span>)</span><spanclass="result">: <spanname="scala.Boolean"class="extype">Boolean</span></span></span><pclass="shortcomment cmt">na</p><divclass="fullcomment"><divclass="comment cmt"><p>na</p></div><dlclass="paramcmts block"><dtclass="param">zoneid</dt><ddclass="cmt"><p>zone to lock next</p></dd><dtclass="param">galaxyService</dt><ddclass="cmt"><p>callback to update the server and clients;
should be the reference to <code>GalaxyService</code>, hence the literal name</p></dd><dt>returns</dt><ddclass="cmt"><p><code>true</code>, if the target zone is locked when complete;
<code>false</code>, otherwise</p></dd></dl><dlclass="attributes block"><dt>See also</dt><dd><spanclass="cmt"><p><code>GalaxyService</code></p></span></dd></dl></div></li><liclass="indented0 "name="net.psforever.services.CavernRotationService#hurryRotationToZoneUnlock"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="pub"><aid="hurryRotationToZoneUnlock(zoneid:String,galaxyService:akka.actor.ActorRef):Boolean"class="anchorToMember"></a><aid="hurryRotationToZoneUnlock(String,ActorRef):Boolean"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../net/psforever/services/CavernRotationService.html#hurryRotationToZoneUnlock(zoneid:String,galaxyService:akka.actor.ActorRef):Boolean"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">def</span></span><spanclass="symbol"><spanclass="name">hurryRotationToZoneUnlock</span><spanclass="params">(<spanname="zoneid">zoneid: <spanname="scala.Predef.String"class="extype">String</span></span>, <spanname="galaxyService">galaxyService: <spanname="akka.actor.ActorRef"class="extype">ActorRef</span></span>)</span><spanclass="result">: <spanname="scala.Boolean"class="extype">Boolean</span></span></span><pclass="shortcomment cmt">na</p><divclass="fullcomment"><divclass="comment cmt"><p>na</p></div><dlclass="paramcmts block"><dtclass="param">zoneid</dt><ddclass="cmt"><p>zone to unlock next</p></dd><dtclass="param">galaxyService</dt><ddclass="cmt"><p>callback to update the server and clients;
should be the reference to <code>GalaxyService</code>, hence the literal name</p></dd><dt>returns</dt><ddclass="cmt"><p><code>true</code>, if the target zone is unlocked when complete;
<code>false</code>, otherwise</p></dd></dl><dlclass="attributes block"><dt>See also</dt><dd><spanclass="cmt"><p><code>GalaxyService</code></p></span></dd></dl></div></li><liclass="indented0 "name="scala.Any#isInstanceOf"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="pub"><aid="isInstanceOf[T0]:Boolean"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../net/psforever/services/CavernRotationService.html#isInstanceOf[T0]:Boolean"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier">final </span><spanclass="kind">def</span></span><spanclass="symbol"><spanclass="name">isInstanceOf</span><spanclass="tparams">[<spanname="T0">T0</span>]</span><spanclass="result">: <spanname="scala.Boolean"class="extype">Boolean</span></span></span><divclass="fullcomment"><dlclass="attributes block"><dt>Definition Classes</dt><dd>Any</dd></dl></div></li><liclass="indented0 "name="net.psforever.services.CavernRotationService#lockTimer"group="Ungrouped"fullComment="no"data-isabs="false"visbl="pub"><aid="lockTimer:akka.actor.Cancellable"class="anchorToMember"></a><aid="lockTimer:Cancellable"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../net/psforever/services/CavernRotationService.html#lockTimer:akka.actor.Cancellable"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">var</span></span><spanclass="symbol"><spanclass="name">lockTimer</span><spanclass="result">: <spanname="akka.actor.Cancellable"class="extype">Cancellable</span></span></span><pclass="shortcomment cmt">timer for cavern rotation - the cavern closing warning</p></li><liclass="indented0 "name="net.psforever.services.CavernRotationService#lockTimerToDisplayWarning"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="pub"><aid="lockTimerToDisplayWarning(duration:scala.concurrent.duration.FiniteDuration,counter:Int):Unit"class="anchorToMember"></a><aid="lockTimerToDisplayWarning(FiniteDuration,Int):Unit"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../net/psforever/services/CavernRotationService.html#lockTimerToDisplayWarning(duration:scala.concurrent.duration.FiniteDuration,counter:Int):Unit"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">def</span></span><spanclass="symbol"><spanclass="name">lockTimerToDisplayWarning</span><spanclass="params">(<spanname="duration">duration: <spanname="scala.concurrent.duration.FiniteDuration"class="extype">FiniteDuration</span></span>, <spanname="counter">counter: <spanname="scala.Int"class="extype">Int</span> = <spanclass="symbol"><spanclass="name"><ahref="#firstClosingWarningAtMinutes:Int">firstClosingWarningAtMinutes</a></span></span></span>)</span><spanclass="result">: <spanname="scala.Unit"class="extype">Unit</span></span></span><pclass="shortcomment cmt">Update the timer for the cavern closing message.</p><divclass="fullcomment"><divclass="comment cmt"><p>Update the timer for the cavern closing message.</p></div><dlclass="paramcmts block"><dtclass="param">duration</dt><ddclass="cmt"><p>new time until message display</p></dd><dtclass="param">counter</dt><ddclass="cmt"><p>the counter that indicates the next message to display</p></dd></dl></div></li><liclass="indented0 "name="net.psforever.services.CavernRotationService#manageCaverns"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="pub"><aid="manageCaverns(zones:Seq[net.psforever.objects.zones.Zone]):Boolean"class="anchorToMember"></a><aid="manageCaverns(Seq[Zone]):Boolean"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../net/psforever/services/CavernRotationService.html#manageCaverns(zones:Seq[net.psforever.objects.zones.Zone]):Boolean"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanc
<code>false</code>, otherwise</p></dd></dl></div></li><liclass="indented0 "name="net.psforever.services.CavernRotationService#managedZones"group="Ungrouped"fullComment="no"data-isabs="false"visbl="pub"><aid="managedZones:List[net.psforever.services.CavernRotationService.ZoneMonitor]"class="anchorToMember"></a><aid="managedZones:List[ZoneMonitor]"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../net/psforever/services/CavernRotationService.html#managedZones:List[net.psforever.services.CavernRotationService.ZoneMonitor]"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">var</span></span><spanclass="symbol"><spanclass="name">managedZones</span><spanclass="result">: <spanname="scala.List"class="extype">List</span>[<ahref="CavernRotationService$$ZoneMonitor.html"name="net.psforever.services.CavernRotationService.ZoneMonitor"id="net.psforever.services.CavernRotationService.ZoneMonitor"class="extype">ZoneMonitor</a>]</span></span><pclass="shortcomment cmt">monitors for the cavern zones</p></li><liclass="indented0 "name="scala.AnyRef#ne"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="pub"><aid="ne(x$1:AnyRef):Boolean"class="anchorToMember"></a><aid="ne(AnyRef):Boolean"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../net/psforever/services/CavernRotationService.html#ne(x$1:AnyRef):Boolean"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier">final </span><spanclass="kind">def</span></span><spanclass="symbol"><spanclass="name">ne</span><spanclass="params">(<spanname="arg0">arg0: <spanname="scala.AnyRef"class="extype">AnyRef</span></span>)</span><spanclass="result">: <spanname="scala.Boolean"class="extype">Boolean</span></span></span><divclass="fullcomment"><dlclass="attributes block"><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div></li><liclass="indented0 "name="net.psforever.services.CavernRotationService#nextToLock"group="Ungrouped"fullComment="no"data-isabs="false"visbl="pub"><aid="nextToLock:Int"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../net/psforever/services/CavernRotationService.html#nextToLock:Int"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">var</span></span><spanclass="symbol"><spanclass="name">nextToLock</span><spanclass="result">: <spanname="scala.Int"class="extype">Int</span></span></span><pclass="shortcomment cmt">index of the next cavern that will lock</p></li><liclass="indented0 "name="net.psforever.services.CavernRotationService#nextToUnlock"group="Ungrouped"fullComment="no"data-isabs="false"visbl="pub"><aid="nextToUnlock:Int"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../net/psforever/services/CavernRotationService.html#nextToUnlock:Int"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">var</span></span><spanclass="symbol"><spanclass="name">nextToUnlock</span><spanclass="result">: <spanname="scala.Int"class="extype">Int</span></span></span><pclass="shortcomment cmt">index of the next cavern that will unlock</p></li><liclass="indented0 "name="scala.AnyRef#notify"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="pub"><aid="notify():Unit"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../net/psforever/services/CavernRotationService.html#notify():Unit"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier">final </span><spanclass="kind">def</span></span><spanclass="symbol"><spanclass="name">notify</span><spanclass="params">()</span><spanclass="result">: <spanname="scala.Unit"class="extype">Unit</span></span></span><divclass="fullcomment"><dlclass="attributes block"><dt>Definition Classes</dt><d
advance the previous start time of each zone monitor to give the impression of the hastened rotation.</p><divclass="fullcomment"><divclass="comment cmt"><p>If the natural process of switching between caverns is hurried,
advance the previous start time of each zone monitor to give the impression of the hastened rotation.
This does not actually affect the functional timers
nor is it in response to an actual zone rotation event.
It only affects the backup parameters of the timers that are maintained by the zone monitors.</p></div><dlclass="paramcmts block"><dtclass="param">advanceTimeBy</dt><ddclass="cmt"><p>amount of time advancement</p></dd><dtclass="param">galaxyService</dt><ddclass="cmt"><p>callback to update the zone timers;
should be the reference to <code>GalaxyService</code>, hence the literal name</p></dd></dl><dlclass="attributes block"><dt>See also</dt><dd><spanclass="cmt"><p><code>GalaxyService</code></p></span></dd></dl></div></li><liclass="indented0 "name="net.psforever.services.CavernRotationService#retimeZonesUponForcedRotation"group="Ungrouped"fullComment="yes"data-isabs="false"visbl="pub"><aid="retimeZonesUponForcedRotation(galaxyService:akka.actor.ActorRef):Unit"class="anchorToMember"></a><aid="retimeZonesUponForcedRotation(ActorRef):Unit"class="anchorToMember"></a><spanclass="permalink"><ahref="../../../net/psforever/services/CavernRotationService.html#retimeZonesUponForcedRotation(galaxyService:akka.actor.ActorRef):Unit"title="Permalink"><iclass="material-icons"></i></a></span><spanclass="modifier_kind"><spanclass="modifier"></span><spanclass="kind">def</span></span><spanclass="symbol"><spanclass="name">retimeZonesUponForcedRotation</span><spanclass="params">(<spanname="galaxyService">galaxyService: <spanname="akka.actor.ActorRef"class="extype">ActorRef</span></span>)</span><spanclass="result">: <spanname="scala.Unit"class="extype">Unit</span></span></span><pclass="shortcomment cmt">If the zones are forced to rotate before the timer would normally complete,
correct all of the zone monitors to give the impression of the rotation that occurred.</p><divclass="fullcomment"><divclass="comment cmt"><p>If the zones are forced to rotate before the timer would normally complete,
correct all of the zone monitors to give the impression of the rotation that occurred.
Only affect the backup parameters of the timers that are maintained by the zone monitors.
Do not actually affect the functional timers.</p></div><dlclass="paramcmts block"><dtclass="param">galaxyService</dt><ddclass="cmt"><p>callback to update the zone timers;
The process of zone rotation occurs by having a zone that is determined to be closing
and a zone that is determied to be opening
and a potential series of zones "in between" the two that are also open.</p><divclass="fullcomment"><divclass="comment cmt"><p>Actually perform zone rotation as determined by the managed zone monitors and the timers.<br>
<br>
The process of zone rotation occurs by having a zone that is determined to be closing
and a zone that is determied to be opening
and a potential series of zones "in between" the two that are also open.
All of the currently opened zones are locked and the zone to be permanently closed is forgotten.
The zone that should be opening is added to the aforementioned sequence of zones
and then the zones in that sequence are opened.
The zones that would otherwise be unaffected by a single zone opening and a single cone closing must be affected
because the cavern gates will not connect to the same geowarp gates with the change in the sequence.
After the rotation, the indices to the next closing zone and next opening zone are updated.
Modifying the zone monitor timekeeping and the actual timers and the indices are the easy parts.</p></div><dlclass="paramcmts block"><dtclass="param">galaxyService</dt><ddclass="cmt"><p>callback to update the server and clients;
should be the reference to <code>GalaxyService</code>, hence the literal name</p></dd></dl><dlclass="attributes block"><dt>See also</dt><dd><spanclass="cmt"><p><code>GalaxyService</code></p></span></dd></dl></div></li></ol></div></div><divid="inheritedMembers"><divname="scala.AnyRef"class="parent"><h3>Inherited from <spanname="scala.AnyRef"class="extype">AnyRef</span></h3></div><divname="scala.Any"class="parent"><h3>Inherited from <spanname="scala.Any"class="extype">Any</span></h3></div></div><divid="groupedMembers"><divname="Ungrouped"class="group"><h3>Ungrouped</h3></div></div></div><divid="tooltip"></div><divid="footer"></div></body></div></div></div></body></html>