Return-Path: X-Original-To: apmail-brooklyn-dev-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 38CD818A67 for ; Tue, 22 Mar 2016 15:33:06 +0000 (UTC) Received: (qmail 85131 invoked by uid 500); 22 Mar 2016 15:33:06 -0000 Delivered-To: apmail-brooklyn-dev-archive@brooklyn.apache.org Received: (qmail 85103 invoked by uid 500); 22 Mar 2016 15:33:06 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 84845 invoked by uid 99); 22 Mar 2016 15:33:05 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Mar 2016 15:33:05 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A5D0FDFBDB; Tue, 22 Mar 2016 15:33:05 +0000 (UTC) From: aledsage To: dev@brooklyn.apache.org Reply-To: dev@brooklyn.apache.org References: In-Reply-To: Subject: [GitHub] brooklyn-server pull request: Test clocker Content-Type: text/plain Message-Id: <20160322153305.A5D0FDFBDB@git1-us-west.apache.org> Date: Tue, 22 Mar 2016 15:33:05 +0000 (UTC) Github user aledsage commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/59#discussion_r57007967 --- Diff: core/src/main/java/org/apache/brooklyn/core/location/dynamic/DynamicLocation.java --- @@ -47,4 +49,14 @@ E getOwner(); + /** + * An opportunity to register this location (e.g. with the {@link LocationRegistry} or the + * catalog, so that it will be persisted). + */ + LocationDefinition register(); --- End diff -- `register()` is being used (in Clocker) to register the new "BasicLocationDefinition" for that new named location. We could maybe do it in init(), rebind() and unmanage(). But by having an explicit register() method called by the entity that owns the location, we can ensure that the LocationRegistry is only updated when the location object is completely initialised. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---