MCPcopy Index your code
hub / github.com/totaljs/framework / Counter

Function Counter

nosql.js:3152–3168  ·  view source on GitHub ↗
(db)

Source from the content-addressed store, hash-verified

3150};
3151
3152function Counter(db) {
3153 var t = this;
3154 t.TIMEOUT = 30000;
3155 t.db = db;
3156 t.cache;
3157 t.filenameLock = db.filenameCounter + '-lock';
3158 t.key = (db instanceof Table ? 'table' : 'nosql') + db.name.hash();
3159 t.type = 0; // 1 === saving, 2 === reading
3160 t.$events = {};
3161 t.$cb_save = function() {
3162 t.tid = undefined;
3163 if (F.isCluster)
3164 clusterlock(t, '$save');
3165 else
3166 t.$save();
3167 };
3168}
3169
3170const CP = Counter.prototype;
3171

Callers

nothing calls this directly

Calls 1

clusterlockFunction · 0.85

Tested by

no test coverage detected