161718192021222324
public static TaskStorage getTaskStorage() { if (taskStorageInstance == null) { // Eventually the storage mechanism would be configurable, rather than hard-coded. taskStorageInstance = new MongoTaskStorage(); } return taskStorageInstance; }