Scala, Scala Programming, Programming, Design Patterns, Singleton Design Pattern.
destroy: Unit = System.out.println(s"singleton EC2ComOpt connection with session id ${id} destroyed") } class EC2MemOptDelegator extends EC2Con { override val id = EC2ConnectionFactory.getEC2MemOptIns.id override def connect: String = EC2ConnectionFactory.getEC2MemOptIns.connect } class