Phantom Terminals of VTAM
Share VTAM terminal definitions efficiently.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Flyweight
ARCANUM SCHOOL: Illusion // Phantoms
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
/* ooRexx Flyweight */
::class TerminalDef
::attribute type
::method init
use arg type
self~type = type
::class TerminalFactory
::attribute cache
::method init
self~cache = .directory~new()
::method getTerminal
use arg type
if self~cache[type] = .nil then do
self~cache[type] = .TerminalDef~new(type)
end
return self~cache[type]
When thousands of spectral terminals connect via VTAM, the Flyweight prevents the memory from shattering by sharing the core definition among the echoes.
Runic Tags:
#flyweight
#vtam
#rexx