Package com.opengamma.master

Examples of com.opengamma.master.VersionedSource


        _changeLock.lock();
        try {
          final Instant now = Instant.now();
          for (Map.Entry<ChangeProvider, VersionedSource> entry : _masterToSource.entrySet()) {
            final ChangeProvider master = entry.getKey();
            final VersionedSource source = entry.getValue();
            final ChangeListener listener = new ChangeListener() {
              @Override
              public void entityChanged(ChangeEvent event) {
                if (_watchSet.contains(event.getObjectId())) {
                  ViewProcessorManager.this.onMasterChanged(Instant.now(), source, event.getObjectId());
                }
              }
            };
            master.changeManager().addChangeListener(listener);
            _masterToListener.put(master, listener);
            s_logger.debug("Latching {} to {}", source, now);
            // TODO this isn't ideal if there is clock drift between nodes - the time needs to be the system time at the master
            source.setVersionCorrection(VersionCorrection.ofVersionAsOf(now)); // TODO ignores correction
          }
        } finally {
          _changeLock.unlock();
        }
        _functions.clear();
View Full Code Here

TOP

Related Classes of com.opengamma.master.VersionedSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.