remote_gate.go ×3

Frontier kind: Code frontier

unlabeled · c_00e0ab214638

16 tests · 14 LOC · 1 file · introduces 0 tests · 14 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
3 ranges14 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
3 ranges14 lines · 1 file · Browse complete extent
All tests (intent)
16 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Introduced files, introduced tests, and structurally relevant concept specializationTestLookAheadTask_HasLookAheadTask · 0 introduced LOCTestLookAheadTask_HasLoo…queue_scheduled.go ×2 · 9 introduced LOCqueue_scheduled.go ×2TestLookAheadTask_NoLookAheadTask · 0 introduced LOCTestLookAheadTask_NoLook…remote_gate.go ×1 · 4 introduced LOCremote_gate.go ×1remote_gate.go ×1 · 3 introduced LOCremote_gate.go ×1TestTimerFireAfterUpdate_NotActive_Updated · 0 introduced LOCTestTimerFireAfterUpdate…TestTimerFire, TestTimerSetCurrentTime_Update_TimerFired · 0 introduced LOCTestTimerFire, TestTimer…remote_gate.go ×1 · 3 introduced LOCremote_gate.go ×1remote_gate.go ×1 · 2 introduced LOCremote_gate.go ×1remote_gate.go ×1 · 1 introduced LOCremote_gate.go ×1TestTimerSetCurrentTime_Update_TimerNotFired · 0 introduced LOCTestTimerSetCurrentTime_…remote_gate.go ×1 · 1 introduced LOCremote_gate.go ×1TestTimerFireAfterUpdate_NotActive_NotUpdated, TestTimerSetCurrentTime_Update_TimerAlreadyFired · 0 introduced LOCTestTimerFireAfterUpdate…TestTimerWillFire_Zero, TestTimerWillFire_NotActive · 0 introduced LOCTestTimerWillFire_Zero, …remote_gate.go ×2 · 3 introduced LOCremote_gate.go ×2TestTimerWillFire_Active · 0 introduced LOCTestTimerWillFire_Activeremote_gate.go ×1 · 3 introduced LOCremote_gate.go ×1remote_gate.go ×1 · 7 introduced LOCremote_gate.go ×1remote_gate.go ×1 · 3 introduced LOCremote_gate.go ×1remote_gate.go ×1 · 3 introduced LOCremote_gate.go ×1remote_gate.go ×4 · 9 introduced LOCremote_gate.go ×4remote_gate.go ×1 · 3 introduced LOCremote_gate.go ×1remote_gate.go ×1 · 5 introduced LOCremote_gate.go ×1remote_gate.go ×1 · 3 introduced LOCremote_gate.go ×1TestOperatorServiceMetadata, TestWorkflowServiceMetadata · 0 introduced LOCTestOperatorServiceMetad…go.temporal.io/server/common/timer/remote_gate.go · 130 LOCtimer/remote_gate.gogo.temporal.io/server/service/history/queues/queue_scheduled.go · 301 LOCqueues/queue_scheduled.g…TestOperatorServiceMetadata · introduced test · go.temporal.io/server/common/api/TestOperatorServiceMetadataTestOperatorServiceMetad…TestWorkflowServiceMetadata · introduced test · go.temporal.io/server/common/api/TestWorkflowServiceMetadataTestWorkflowServiceMetad…TestTimerFire · introduced test · go.temporal.io/server/common/timer/TestRemoteTimerGateSuite/TestTimerFireTestTimerFireTestTimerFireAfterUpdate_Active_NotUpdated · introduced test · go.temporal.io/server/common/timer/TestRemoteTimerGateSuite/TestTimerFireAfterUpdate_Active_NotUpdatedTestTimerFireAfterUpdate…TestTimerFireAfterUpdate_Active_Updated · introduced test · go.temporal.io/server/common/timer/TestRemoteTimerGateSuite/TestTimerFireAfterUpdate_Active_UpdatedTestTimerFireAfterUpdate…TestTimerFireAfterUpdate_Active_Updated_BeforeNow · introduced test · go.temporal.io/server/common/timer/TestRemoteTimerGateSuite/TestTimerFireAfterUpdate_Active_Updated_BeforeNowTestTimerFireAfterUpdate…TestTimerFireAfterUpdate_NotActive_NotUpdated · introduced test · go.temporal.io/server/common/timer/TestRemoteTimerGateSuite/TestTimerFireAfterUpdate_NotActive_NotUpdatedTestTimerFireAfterUpdate…TestTimerFireAfterUpdate_NotActive_Updated · introduced test · go.temporal.io/server/common/timer/TestRemoteTimerGateSuite/TestTimerFireAfterUpdate_NotActive_UpdatedTestTimerFireAfterUpdate…TestTimerSetCurrentTime_NoUpdate · introduced test · go.temporal.io/server/common/timer/TestRemoteTimerGateSuite/TestTimerSetCurrentTime_NoUpdateTestTimerSetCurrentTime_…TestTimerSetCurrentTime_Update_TimerAlreadyFired · introduced test · go.temporal.io/server/common/timer/TestRemoteTimerGateSuite/TestTimerSetCurrentTime_Update_TimerAlreadyFiredTestTimerSetCurrentTime_…TestTimerSetCurrentTime_Update_TimerFired · introduced test · go.temporal.io/server/common/timer/TestRemoteTimerGateSuite/TestTimerSetCurrentTime_Update_TimerFiredTestTimerSetCurrentTime_…TestTimerSetCurrentTime_Update_TimerNotFired · introduced test · go.temporal.io/server/common/timer/TestRemoteTimerGateSuite/TestTimerSetCurrentTime_Update_TimerNotFiredTestTimerSetCurrentTime_…TestTimerWillFire_Active · introduced test · go.temporal.io/server/common/timer/TestRemoteTimerGateSuite/TestTimerWillFire_ActiveTestTimerWillFire_ActiveTestTimerWillFire_NotActive · introduced test · go.temporal.io/server/common/timer/TestRemoteTimerGateSuite/TestTimerWillFire_NotActiveTestTimerWillFire_NotAct…TestTimerWillFire_Zero · introduced test · go.temporal.io/server/common/timer/TestRemoteTimerGateSuite/TestTimerWillFire_ZeroTestTimerWillFire_ZeroTestLookAheadTask_ErrorLookAhead · introduced test · go.temporal.io/server/service/history/queues/TestScheduledQueueSuite/TestLookAheadTask_ErrorLookAheadTestLookAheadTask_ErrorL…TestLookAheadTask_HasLookAheadTask · introduced test · go.temporal.io/server/service/history/queues/TestScheduledQueueSuite/TestLookAheadTask_HasLookAheadTaskTestLookAheadTask_HasLoo…TestLookAheadTask_NoLookAheadTask · introduced test · go.temporal.io/server/service/history/queues/TestScheduledQueueSuite/TestLookAheadTask_NoLookAheadTaskTestLookAheadTask_NoLook…Focused concept · remote_gate.go ×3 · 14 introduced LOCremote_gate.go ×3

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 14 introduced LOC across 3 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/timer/remote_gate.go 14 introduced LOC · 3 ranges

Open complete file

29
30 // NewRemoteGate create a new timer gate instance
31 > func NewRemoteGate() RemoteGate { remote_gate.go
32 > rg := &RemoteGateImpl{
33 > currentTime: time.Time{},
34 > nextWakeupTime: time.Time{},
35 > fireCh: make(chan struct{}, 1),
36 > }
37 > return rg
38 > }
39
40 // FireCh return the channel which will be fired when time is up
97 // if new "current" time is after the next wake-up time, return true if
98 // "current" is actually updated
99 > func (rg *RemoteGateImpl) SetCurrentTime(currentTime time.Time) bool { remote_gate.go
100 > rg.Lock()
101 > defer rg.Unlock()
102 >
103 > if !rg.currentTime.Before(currentTime) {
104 // new current time is <= current time
105 return false
107
108 // NOTE: do not update the current time now
109 > if !rg.currentTime.Before(rg.nextWakeupTime) { remote_gate.go
110 // current time already >= next wakeup time
111 // avoid duplicate fire