class InMemoryPortfolioMaster extends SimpleAbstractInMemoryMaster<PortfolioDocument> implements PortfolioMaster {

  @Override
  public void remove(ObjectIdentifiable objectIdentifiable) {
    ArgumentChecker.notNull(objectIdentifiable, "objectIdentifiable");
    PortfolioDocument storedDocument = _store.remove(objectIdentifiable.getObjectId());
    if (storedDocument == null) {
      throw new DataNotFoundException("Portfolio not found " + objectIdentifiable);
    }
    removeNodes(storedDocument.getPortfolio().getRootNode());
    _changeManager.entityChanged(ChangeType.REMOVED, objectIdentifiable.getObjectId(), null, null, Instant.now());
    updateCaches(storedDocument, null);
  }

  public  InMemoryPortfolioMaster();
  public  InMemoryPortfolioMaster(final ChangeManager changeManager);
  public  InMemoryPortfolioMaster(final Supplier<ObjectId> objectIdSupplier);
  public  InMemoryPortfolioMaster(final Supplier<ObjectId> objectIdSupplier, final ChangeManager changeManager);

}