Scala, Scala Programming, Programming, Design Patterns, Singleton Design Pattern.
EC2Con = { new EC2MemOptDelegator() } private[complex] def getEC2MemOptIns: EC2Con = { if (ec2MemOptIns.isEmpty) { this.ec2MemOptIns = Option(new EC2MemOpt) this.ec2MemOptIns.get.create } this.ec2MemOptIns.get } def destroyEC2MemOptIns= { if (this.ec2MemOptIns.nonEmpty) {