@internal
(cloned?: ServerSession | null)
| 1048 | |
| 1049 | /** @internal */ |
| 1050 | constructor(cloned?: ServerSession | null) { |
| 1051 | if (cloned != null) { |
| 1052 | const idBytes = ByteUtils.allocateUnsafe(16); |
| 1053 | idBytes.set(cloned.id.id.buffer); |
| 1054 | this.id = { id: new Binary(idBytes, cloned.id.id.sub_type) }; |
| 1055 | this.lastUse = cloned.lastUse; |
| 1056 | this.txnNumber = cloned.txnNumber; |
| 1057 | this.isDirty = cloned.isDirty; |
| 1058 | return; |
| 1059 | } |
| 1060 | this.id = { id: new Binary(uuidV4(), Binary.SUBTYPE_UUID) }; |
| 1061 | this.lastUse = processTimeMS(); |
| 1062 | this.txnNumber = 0; |
| 1063 | this.isDirty = false; |
| 1064 | } |
| 1065 | |
| 1066 | /** |
| 1067 | * Determines if the server session has timed out. |
nothing calls this directly
no test coverage detected