11package com .massivecraft .massivecore .store ;
22
3+ import com .massivecraft .massivecore .ConfServer ;
4+ import com .massivecraft .massivecore .util .MUtil ;
35import com .massivecraft .massivecore .xlib .gson .JsonObject ;
46
7+ import java .util .List ;
8+
59// Self referencing generic.
610// http://www.angelikalanger.com/GenericsFAQ/FAQSections/ProgrammingIdioms.html#FAQ206
711public class Entity <E extends Entity <E >> extends EntityInternal <E >
@@ -31,13 +35,20 @@ public String getUniverse()
3135 private volatile transient boolean lastDefault = false ;
3236 public boolean getLastDefault () { return this .lastDefault ; }
3337 public void setLastDefault (boolean lastDefault ) { this .lastDefault = lastDefault ; }
34-
38+
39+ private volatile transient List <StackTraceElement > lastStackTraceChanged ;
40+ public List <StackTraceElement > getLastStackTraceChanged () { return this .lastStackTraceChanged ; }
41+ public void setLastStackTraceChanged (List <StackTraceElement > lastStackTraceChanged ) { this .lastStackTraceChanged = lastStackTraceChanged ; }
42+
3543 public void clearSyncLogFields ()
3644 {
3745 this .lastRaw = null ;
3846 this .lastMtime = 0 ;
3947 this .lastDefault = false ;
48+ this .lastStackTraceChanged = null ;
4049 }
50+
51+
4152
4253 // -------------------------------------------- //
4354 // ATTACH AND DETACH
@@ -62,6 +73,14 @@ public E detach()
6273 // -------------------------------------------- //
6374 // SYNC AND IO ACTIONS
6475 // -------------------------------------------- //
76+
77+ @ Override
78+ public void changed ()
79+ {
80+ super .changed ();
81+ if (!ConfServer .localPollingEnabled ) return ;
82+ this .lastStackTraceChanged = MUtil .getStackTrace ();
83+ }
6584
6685 public Modification sync ()
6786 {
0 commit comments