Add missing @Deprecated annotations
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/dfa8aa29 Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/dfa8aa29 Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/dfa8aa29 Branch: refs/heads/master Commit: dfa8aa2926fbecc884ffa75cb5c820c6174199c4 Parents: e61caea Author: Svetoslav Neykov <svetoslav.ney...@cloudsoftcorp.com> Authored: Fri Jan 20 16:24:50 2017 +0200 Committer: Svetoslav Neykov <svetoslav.ney...@cloudsoftcorp.com> Committed: Fri Jan 20 16:24:50 2017 +0200 ---------------------------------------------------------------------- .../java/org/apache/brooklyn/api/catalog/BrooklynCatalog.java | 1 + .../main/java/org/apache/brooklyn/api/catalog/CatalogItem.java | 1 + .../main/java/org/apache/brooklyn/api/entity/EntityLocal.java | 4 ++++ .../main/java/org/apache/brooklyn/api/mgmt/LocationManager.java | 1 + .../java/org/apache/brooklyn/api/mgmt/rebind/RebindManager.java | 1 + .../brooklyn/camp/spi/pdp/AssemblyTemplateConstructor.java | 1 + .../org/apache/brooklyn/camp/brooklyn/AbstractYamlTest.java | 1 + .../org/apache/brooklyn/core/catalog/internal/CatalogUtils.java | 4 ++++ .../java/org/apache/brooklyn/core/config/ConfigPredicates.java | 4 ++++ .../java/org/apache/brooklyn/core/entity/AbstractEntity.java | 4 ++++ .../org/apache/brooklyn/core/entity/BrooklynConfigKeys.java | 2 ++ .../src/main/java/org/apache/brooklyn/core/entity/Entities.java | 4 ++++ .../org/apache/brooklyn/core/entity/EntityAndAttribute.java | 1 + .../java/org/apache/brooklyn/core/entity/EntityInternal.java | 3 +++ .../java/org/apache/brooklyn/core/entity/EntityPredicates.java | 1 + .../apache/brooklyn/core/entity/factory/ApplicationBuilder.java | 1 + .../src/main/java/org/apache/brooklyn/core/feed/FeedConfig.java | 1 + .../apache/brooklyn/core/internal/BrooklynPropertiesImpl.java | 1 + .../brooklyn/core/location/DeprecatedKeysMappingBuilder.java | 1 + .../main/java/org/apache/brooklyn/core/location/Locations.java | 1 + .../org/apache/brooklyn/core/mgmt/internal/EffectorUtils.java | 1 + .../org/apache/brooklyn/core/mgmt/rebind/RebindManagerImpl.java | 1 + .../brooklyn/core/mgmt/rebind/dto/MementosGenerators.java | 1 + .../brooklyn/core/mgmt/rebind/dto/MutableBrooklynMemento.java | 1 + .../org/apache/brooklyn/core/objs/AbstractEntityAdjunct.java | 1 + .../org/apache/brooklyn/core/plan/PlanToSpecTransformer.java | 1 + .../org/apache/brooklyn/core/sensor/DependentConfiguration.java | 1 + .../org/apache/brooklyn/core/server/BrooklynServerConfig.java | 4 ++++ .../brooklyn/enricher/stock/AbstractAggregatingEnricher.java | 1 + .../brooklyn/enricher/stock/AbstractTransformingEnricher.java | 1 + .../enricher/stock/AbstractTypeTransformingEnricher.java | 1 + .../java/org/apache/brooklyn/enricher/stock/AddingEnricher.java | 1 + .../brooklyn/enricher/stock/CustomAggregatingEnricher.java | 5 +++++ .../brooklyn/enricher/stock/SensorPropagatingEnricher.java | 4 ++++ .../brooklyn/enricher/stock/SensorTransformingEnricher.java | 2 ++ .../java/org/apache/brooklyn/entity/stock/BasicStartable.java | 1 + .../org/apache/brooklyn/feed/function/FunctionPollConfig.java | 1 + .../java/org/apache/brooklyn/feed/http/HttpValueFunctions.java | 3 +++ .../main/java/org/apache/brooklyn/feed/ssh/SshPollConfig.java | 2 ++ .../java/org/apache/brooklyn/feed/ssh/SshValueFunctions.java | 2 ++ .../localhost/LocalhostMachineProvisioningLocation.java | 2 ++ .../apache/brooklyn/util/core/BrooklynLanguageExtensions.java | 1 + .../java/org/apache/brooklyn/util/core/flags/FlagUtils.java | 2 ++ .../java/org/apache/brooklyn/util/core/flags/TypeCoercions.java | 1 + .../java/org/apache/brooklyn/util/core/internal/Repeater.java | 1 + .../apache/brooklyn/util/core/internal/ssh/SshAbstractTool.java | 1 + .../org/apache/brooklyn/util/core/internal/ssh/SshTool.java | 1 + .../util/core/internal/ssh/sshj/SshjClientConnection.java | 1 + .../java/org/apache/brooklyn/util/core/task/TaskPredicates.java | 1 + .../org/apache/brooklyn/core/mgmt/rebind/RebindEntityTest.java | 1 + .../apache/brooklyn/core/mgmt/rebind/RebindLocationTest.java | 1 + .../java/org/apache/brooklyn/launcher/common/BasicLauncher.java | 1 + .../java/org/apache/brooklyn/launcher/BrooklynWebServer.java | 1 + .../org/apache/brooklyn/location/jclouds/JcloudsPredicates.java | 1 + .../java/org/apache/brooklyn/location/jclouds/JcloudsUtil.java | 1 + .../brooklyn/policy/enricher/RollingTimeWindowMeanEnricher.java | 1 + .../main/java/org/apache/brooklyn/rest/domain/LocationSpec.java | 1 + .../apache/brooklyn/rest/filter/HaHotCheckResourceFilter.java | 1 + .../org/apache/brooklyn/rest/resources/LocationResource.java | 1 + .../java/org/apache/brooklyn/rest/util/URLParamEncoder.java | 1 + .../apache/brooklyn/rest/testing/mocks/RestMockAppBuilder.java | 1 + .../brooklyn/rest/BrooklynRestApiLauncherTestFixture.java | 1 + .../software/base/AbstractSoftwareProcessWinRmDriver.java | 2 ++ .../org/apache/brooklyn/feed/jmx/JmxNotificationFilters.java | 1 + .../brooklyn/entity/software/base/test/jmx/JmxService.java | 1 + .../src/main/java/org/apache/brooklyn/test/TestUtils.java | 3 +++ .../org/apache/brooklyn/util/collections/TimeWindowedList.java | 1 + .../java/org/apache/brooklyn/util/exceptions/Exceptions.java | 1 + .../main/java/org/apache/brooklyn/util/math/MathFunctions.java | 1 + .../src/main/java/org/apache/brooklyn/util/repeat/Repeater.java | 1 + .../main/java/org/apache/brooklyn/util/ssh/BashCommands.java | 1 + .../src/main/java/org/apache/brooklyn/util/time/Time.java | 1 + 72 files changed, 110 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/api/src/main/java/org/apache/brooklyn/api/catalog/BrooklynCatalog.java ---------------------------------------------------------------------- diff --git a/api/src/main/java/org/apache/brooklyn/api/catalog/BrooklynCatalog.java b/api/src/main/java/org/apache/brooklyn/api/catalog/BrooklynCatalog.java index 248b06b..251457a 100644 --- a/api/src/main/java/org/apache/brooklyn/api/catalog/BrooklynCatalog.java +++ b/api/src/main/java/org/apache/brooklyn/api/catalog/BrooklynCatalog.java @@ -75,6 +75,7 @@ public interface BrooklynCatalog { * @deprecated since 0.10.0; use {@link #peekSpec(CatalogItem)} for a preview of what the item * corresponds to. */ + @Deprecated <T, SpecT extends AbstractBrooklynObjectSpec<? extends T, SpecT>> SpecT createSpec(CatalogItem<T, SpecT> item); /** http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/api/src/main/java/org/apache/brooklyn/api/catalog/CatalogItem.java ---------------------------------------------------------------------- diff --git a/api/src/main/java/org/apache/brooklyn/api/catalog/CatalogItem.java b/api/src/main/java/org/apache/brooklyn/api/catalog/CatalogItem.java index 795e393..41fe87c 100644 --- a/api/src/main/java/org/apache/brooklyn/api/catalog/CatalogItem.java +++ b/api/src/main/java/org/apache/brooklyn/api/catalog/CatalogItem.java @@ -66,6 +66,7 @@ public interface CatalogItem<T,SpecT> extends BrooklynObject, Rebindable { public static interface CatalogBundle extends OsgiBundleWithUrl { /** @deprecated since 0.9.0, use {@link #isNameResolved()} */ + @Deprecated public boolean isNamed(); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/api/src/main/java/org/apache/brooklyn/api/entity/EntityLocal.java ---------------------------------------------------------------------- diff --git a/api/src/main/java/org/apache/brooklyn/api/entity/EntityLocal.java b/api/src/main/java/org/apache/brooklyn/api/entity/EntityLocal.java index 2236608..bc3b818 100644 --- a/api/src/main/java/org/apache/brooklyn/api/entity/EntityLocal.java +++ b/api/src/main/java/org/apache/brooklyn/api/entity/EntityLocal.java @@ -46,6 +46,7 @@ import com.google.common.base.Function; * * @deprecated since 0.9.0; use {@link Entity} or {@link org.apache.brooklyn.core.entity.EntityInternal} */ +@Deprecated public interface EntityLocal extends Entity { // FIXME Rename to something other than EntityLocal. @@ -79,17 +80,20 @@ public interface EntityLocal extends Entity { /** * @deprecated since 0.8.0; use {@link SensorSupport#set(AttributeSensor, Object)} via code like {@code sensors().set(attribute, val)}. */ + @Deprecated <T> T setAttribute(AttributeSensor<T> attribute, T val); /** * @deprecated since 0.8.0; use {@link SensorSupport#modify(AttributeSensor, Function)} via code like {@code sensors().modify(attribute, modifier)}. */ + @Deprecated @Beta <T> T modifyAttribute(AttributeSensor<T> attribute, Function<? super T, Maybe<T>> modifier); /** * @deprecated since 0.8.0; use {@link SensorSupport#emit(Sensor, Object)} via code like {@code sensors().emit(sensor, val)}. */ + @Deprecated <T> void emit(Sensor<T> sensor, T value); /** http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/api/src/main/java/org/apache/brooklyn/api/mgmt/LocationManager.java ---------------------------------------------------------------------- diff --git a/api/src/main/java/org/apache/brooklyn/api/mgmt/LocationManager.java b/api/src/main/java/org/apache/brooklyn/api/mgmt/LocationManager.java index 86ec570..f18e5fc 100644 --- a/api/src/main/java/org/apache/brooklyn/api/mgmt/LocationManager.java +++ b/api/src/main/java/org/apache/brooklyn/api/mgmt/LocationManager.java @@ -78,6 +78,7 @@ public interface LocationManager { * @since 0.6.0 (added only for backwards compatibility, where locations are being created directly). * @deprecated in 0.6.0; use {@link #createLocation(LocationSpec)} instead. */ + @Deprecated Location manage(Location loc); /** http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/RebindManager.java ---------------------------------------------------------------------- diff --git a/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/RebindManager.java b/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/RebindManager.java index c1441db..4e1125b 100644 --- a/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/RebindManager.java +++ b/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/RebindManager.java @@ -110,6 +110,7 @@ public interface RebindManager { /** Forcibly performs persistence, in the foreground * @deprecated since 0.7.0; use {@link #forcePersistNow(boolean, PersistenceExceptionHandler)}, * default parameter here is false to mean incremental, with null/default exception handler */ + @Deprecated @VisibleForTesting public void forcePersistNow(); /** Forcibly performs persistence, in the foreground, either full (all entities) or incremental; http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/camp/camp-base/src/main/java/org/apache/brooklyn/camp/spi/pdp/AssemblyTemplateConstructor.java ---------------------------------------------------------------------- diff --git a/camp/camp-base/src/main/java/org/apache/brooklyn/camp/spi/pdp/AssemblyTemplateConstructor.java b/camp/camp-base/src/main/java/org/apache/brooklyn/camp/spi/pdp/AssemblyTemplateConstructor.java index 81a86fa..c91a943 100644 --- a/camp/camp-base/src/main/java/org/apache/brooklyn/camp/spi/pdp/AssemblyTemplateConstructor.java +++ b/camp/camp-base/src/main/java/org/apache/brooklyn/camp/spi/pdp/AssemblyTemplateConstructor.java @@ -42,6 +42,7 @@ public class AssemblyTemplateConstructor { /** records all the templates to the underlying platform * @deprecated since 0.10.0 use {@link #construct(boolean)} */ + @Deprecated public AssemblyTemplate commit() { return construct(true); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/AbstractYamlTest.java ---------------------------------------------------------------------- diff --git a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/AbstractYamlTest.java b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/AbstractYamlTest.java index f30ae95..a919aba 100644 --- a/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/AbstractYamlTest.java +++ b/camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/AbstractYamlTest.java @@ -140,6 +140,7 @@ public abstract class AbstractYamlTest { } /** @deprecated since 0.10.0, use {@link #createAndStartApplication(String)} instead */ + @Deprecated protected Entity createAndStartApplication(Reader input) throws Exception { return createAndStartApplication(Streams.readFully(input)); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogUtils.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogUtils.java b/core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogUtils.java index dce5493..078ff0f 100644 --- a/core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogUtils.java +++ b/core/src/main/java/org/apache/brooklyn/core/catalog/internal/CatalogUtils.java @@ -256,6 +256,7 @@ public class CatalogUtils { /** @deprecated since 0.9.0 use {@link BrooklynTypeRegistry#get(String, org.apache.brooklyn.api.typereg.BrooklynTypeRegistry.RegisteredTypeKind, Class)} */ // only a handful of items remaining, and those require a CatalogItem + @Deprecated public static CatalogItem<?, ?> getCatalogItemOptionalVersion(ManagementContext mgmt, String versionedId) { if (versionedId == null) return null; if (looksLikeVersionedId(versionedId)) { @@ -276,6 +277,7 @@ public class CatalogUtils { /** @deprecated since 0.9.0 use {@link BrooklynTypeRegistry#get(String, org.apache.brooklyn.api.typereg.BrooklynTypeRegistry.RegisteredTypeKind, Class)} */ // only a handful of items remaining, and those require a CatalogItem + @Deprecated public static <T,SpecT> CatalogItem<T, SpecT> getCatalogItemOptionalVersion(ManagementContext mgmt, Class<T> type, String versionedId) { if (looksLikeVersionedId(versionedId)) { String id = getSymbolicNameFromVersionedId(versionedId); @@ -287,6 +289,7 @@ public class CatalogUtils { } /** @deprecated since it was introduced in 0.9.0; TBD where this should live */ + @Deprecated public static void setDeprecated(ManagementContext mgmt, String symbolicNameAndOptionalVersion, boolean newValue) { RegisteredType item = mgmt.getTypeRegistry().get(symbolicNameAndOptionalVersion); Preconditions.checkNotNull(item, "No such item: " + symbolicNameAndOptionalVersion); @@ -294,6 +297,7 @@ public class CatalogUtils { } /** @deprecated since it was introduced in 0.9.0; TBD where this should live */ + @Deprecated public static void setDisabled(ManagementContext mgmt, String symbolicNameAndOptionalVersion, boolean newValue) { RegisteredType item = mgmt.getTypeRegistry().get(symbolicNameAndOptionalVersion); Preconditions.checkNotNull(item, "No such item: "+symbolicNameAndOptionalVersion); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/config/ConfigPredicates.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/config/ConfigPredicates.java b/core/src/main/java/org/apache/brooklyn/core/config/ConfigPredicates.java index a2f5bec..16ffca4 100644 --- a/core/src/main/java/org/apache/brooklyn/core/config/ConfigPredicates.java +++ b/core/src/main/java/org/apache/brooklyn/core/config/ConfigPredicates.java @@ -83,21 +83,25 @@ public class ConfigPredicates { } /** @deprecated since 0.9.0; use {@link #nameStartsWith(String)} */ + @Deprecated public static Predicate<ConfigKey<?>> startingWith(final String prefix) { return nameStartsWith(prefix); } /** @deprecated since 0.9.0; use {@link #nameMatchesGlob(String)} */ + @Deprecated public static Predicate<ConfigKey<?>> matchingGlob(final String glob) { return nameMatchesGlob(glob); } /** @deprecated since 0.9.0; use {@link #nameMatchesRegex(String)} */ + @Deprecated public static Predicate<ConfigKey<?>> matchingRegex(final String regex) { return nameMatchesRegex(regex); } /** @deprecated since 0.9.0; use {@link #nameSatisfies(Predicate)} */ + @Deprecated public static Predicate<ConfigKey<?>> nameMatching(final Predicate<String> filter) { return nameSatisfies(filter); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java b/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java index d6a372f..abd6cc1 100644 --- a/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java +++ b/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java @@ -845,6 +845,7 @@ public abstract class AbstractEntity extends AbstractBrooklynObject implements E // FIXME Can this really be deleted? Overridden by AbstractApplication; needs careful review /** @deprecated since 0.4.0 should not be needed / leaked outwith brooklyn internals / mgmt support? */ + @Deprecated protected synchronized void setApplication(Application app) { if (application != null) { if (application.getId() != app.getId()) { @@ -1038,6 +1039,7 @@ public abstract class AbstractEntity extends AbstractBrooklynObject implements E * <p> * returns old value * @deprecated on interface since 0.5.0; use {@link ConfigToAttributes#apply(EntityLocal, AttributeSensorAndConfigKey)} */ + @Deprecated public <T> T setAttribute(AttributeSensorAndConfigKey<?,T> configuredSensor) { T v = getAttribute(configuredSensor); if (v!=null) return v; @@ -2044,6 +2046,7 @@ public abstract class AbstractEntity extends AbstractBrooklynObject implements E * including the initial management started and subsequent management node master-change for this entity. * @deprecated since 0.4.0 override EntityManagementSupport.onManagementStarted if customization needed */ + @Deprecated public void onManagementBecomingMaster() {} /** @@ -2051,6 +2054,7 @@ public abstract class AbstractEntity extends AbstractBrooklynObject implements E * including the final management end and subsequent management node master-change for this entity. * @deprecated since 0.4.0 override EntityManagementSupport.onManagementStopped if customization needed */ + @Deprecated public void onManagementNoLongerMaster() {} /** http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/entity/BrooklynConfigKeys.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/entity/BrooklynConfigKeys.java b/core/src/main/java/org/apache/brooklyn/core/entity/BrooklynConfigKeys.java index 5e77613..40baf65 100644 --- a/core/src/main/java/org/apache/brooklyn/core/entity/BrooklynConfigKeys.java +++ b/core/src/main/java/org/apache/brooklyn/core/entity/BrooklynConfigKeys.java @@ -168,8 +168,10 @@ public class BrooklynConfigKeys { null); /** @deprecated since 0.7.0; use {@link #INSTALL_DIR} */ + @Deprecated public static final ConfigKey<String> SUGGESTED_INSTALL_DIR = INSTALL_DIR.getConfigKey(); /** @deprecated since 0.7.0; use {@link #RUN_DIR} */ + @Deprecated public static final ConfigKey<String> SUGGESTED_RUN_DIR = RUN_DIR.getConfigKey(); /* http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/entity/Entities.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/entity/Entities.java b/core/src/main/java/org/apache/brooklyn/core/entity/Entities.java index bdc00df..9df6e93 100644 --- a/core/src/main/java/org/apache/brooklyn/core/entity/Entities.java +++ b/core/src/main/java/org/apache/brooklyn/core/entity/Entities.java @@ -753,6 +753,7 @@ public class Entities { /** * @deprecated since 0.10.0; see {@link #descendantsAndSelf(Entity, Predicate)} */ + @Deprecated public static Iterable<Entity> descendants(Entity root, Predicate<? super Entity> matching) { return descendantsAndSelf(root, matching); } @@ -760,6 +761,7 @@ public class Entities { /** * @deprecated since 0.10.0; see {@link #descendantsAndSelf(Entity)} */ + @Deprecated public static Iterable<Entity> descendants(Entity root) { return descendantsAndSelf(root); } @@ -767,6 +769,7 @@ public class Entities { /** * @deprecated since 0.10.0; see {@link #descendantsAndSelf(Entity)} */ + @Deprecated public static <T extends Entity> Iterable<T> descendants(Entity root, Class<T> ofType) { return descendantsAndSelf(root, ofType); } @@ -774,6 +777,7 @@ public class Entities { /** * @deprecated since 0.10.0; see {@link #ancestorsAndSelf(Entity)} */ + @Deprecated public static Iterable<Entity> ancestors(final Entity root) { return ancestorsAndSelf(root); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/entity/EntityAndAttribute.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/entity/EntityAndAttribute.java b/core/src/main/java/org/apache/brooklyn/core/entity/EntityAndAttribute.java index 037722c..3197f14 100644 --- a/core/src/main/java/org/apache/brooklyn/core/entity/EntityAndAttribute.java +++ b/core/src/main/java/org/apache/brooklyn/core/entity/EntityAndAttribute.java @@ -45,6 +45,7 @@ public class EntityAndAttribute<T> implements Supplier<T> { /** * @deprecated since 0.7.0; use {@link #create(Entity, AttributeSensor)}; this does not relate to {@link Supplier} */ + @Deprecated public static <T> EntityAndAttribute<T> supplier(Entity entity, AttributeSensor<T> attribute) { return create(entity, attribute); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/entity/EntityInternal.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/entity/EntityInternal.java b/core/src/main/java/org/apache/brooklyn/core/entity/EntityInternal.java index 23f6b69..d6d51a1 100644 --- a/core/src/main/java/org/apache/brooklyn/core/entity/EntityInternal.java +++ b/core/src/main/java/org/apache/brooklyn/core/entity/EntityInternal.java @@ -65,17 +65,20 @@ public interface EntityInternal extends BrooklynObjectInternal, EntityLocal, Reb /** * @deprecated since 0.8.0; use {@link SensorSupportInternal#setWithoutPublishing(AttributeSensor, Object)} via code like {@code sensors().setWithoutPublishing(attribute, val)}. */ + @Deprecated <T> T setAttributeWithoutPublishing(AttributeSensor<T> sensor, T val); /** * @deprecated since 0.8.0; use {@link SensorSupportInternal#getAll()} via code like {@code sensors().getAll()}. */ + @Deprecated @Beta Map<AttributeSensor, Object> getAllAttributes(); /** * @deprecated since 0.8.0; use {@link SensorSupportInternal#remove(AttributeSensor)} via code like {@code sensors().remove(attribute)}. */ + @Deprecated @Beta void removeAttribute(AttributeSensor<?> attribute); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/entity/EntityPredicates.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/entity/EntityPredicates.java b/core/src/main/java/org/apache/brooklyn/core/entity/EntityPredicates.java index 41f016c..60cd8cc 100644 --- a/core/src/main/java/org/apache/brooklyn/core/entity/EntityPredicates.java +++ b/core/src/main/java/org/apache/brooklyn/core/entity/EntityPredicates.java @@ -115,6 +115,7 @@ public class EntityPredicates { /** @deprecated since 0.7.0 use {@link #displayNameSatisfies(Predicate)} to clarify this is *regex* matching * (passing {@link StringPredicates#matchesRegex(String)} as the predicate) */ + @Deprecated public static Predicate<Entity> displayNameMatches(final String regex) { return displayNameSatisfies(StringPredicates.matchesRegex(regex)); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/entity/factory/ApplicationBuilder.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/entity/factory/ApplicationBuilder.java b/core/src/main/java/org/apache/brooklyn/core/entity/factory/ApplicationBuilder.java index 66f4795..e9ee898 100644 --- a/core/src/main/java/org/apache/brooklyn/core/entity/factory/ApplicationBuilder.java +++ b/core/src/main/java/org/apache/brooklyn/core/entity/factory/ApplicationBuilder.java @@ -106,6 +106,7 @@ public abstract class ApplicationBuilder { } /** @deprecated class can be removed; users of this convenience method can now simply do mgmt.getEntityManager().createEntity(spec) */ + @Deprecated @SuppressWarnings("unchecked") @Beta public static <T extends StartableApplication> T newManagedApp(EntitySpec<T> spec, ManagementContext managementContext) { http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/feed/FeedConfig.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/feed/FeedConfig.java b/core/src/main/java/org/apache/brooklyn/core/feed/FeedConfig.java index b9662ef..7c5bebb 100644 --- a/core/src/main/java/org/apache/brooklyn/core/feed/FeedConfig.java +++ b/core/src/main/java/org/apache/brooklyn/core/feed/FeedConfig.java @@ -43,6 +43,7 @@ public class FeedConfig<V, T, F extends FeedConfig<V, T, F>> { /** The onSuccess or onError functions can return this value to indicate that the sensor should not change. * @deprecated since 0.7.0 use UNCHANGED */ + @Deprecated public static final Object UNSET = Entities.UNCHANGED; /** The onSuccess or onError functions can return this value to indicate that the sensor should not change. */ public static final Object UNCHANGED = Entities.UNCHANGED; http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/internal/BrooklynPropertiesImpl.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/internal/BrooklynPropertiesImpl.java b/core/src/main/java/org/apache/brooklyn/core/internal/BrooklynPropertiesImpl.java index 50add48..6c50cde 100644 --- a/core/src/main/java/org/apache/brooklyn/core/internal/BrooklynPropertiesImpl.java +++ b/core/src/main/java/org/apache/brooklyn/core/internal/BrooklynPropertiesImpl.java @@ -95,6 +95,7 @@ public class BrooklynPropertiesImpl extends LinkedHashMap implements BrooklynPro private BrooklynPropertiesImpl originalProperties = null; /** @deprecated since 0.7.0 use static methods in {@link Factory} to create */ + @Deprecated public Builder() { this(true); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/location/DeprecatedKeysMappingBuilder.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/location/DeprecatedKeysMappingBuilder.java b/core/src/main/java/org/apache/brooklyn/core/location/DeprecatedKeysMappingBuilder.java index d5cb3c6..c4eec74 100644 --- a/core/src/main/java/org/apache/brooklyn/core/location/DeprecatedKeysMappingBuilder.java +++ b/core/src/main/java/org/apache/brooklyn/core/location/DeprecatedKeysMappingBuilder.java @@ -29,6 +29,7 @@ import com.google.common.collect.ImmutableMap; /** * @deprecated since 0.6; for use only in converting deprecated flags; will be deleted in future version. */ +@Deprecated public class DeprecatedKeysMappingBuilder { private final ImmutableMap.Builder<String,String> builder = new ImmutableMap.Builder<String,String>(); private final Logger logger; http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/location/Locations.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/location/Locations.java b/core/src/main/java/org/apache/brooklyn/core/location/Locations.java index 6fa468d..8ef0d32 100644 --- a/core/src/main/java/org/apache/brooklyn/core/location/Locations.java +++ b/core/src/main/java/org/apache/brooklyn/core/location/Locations.java @@ -101,6 +101,7 @@ public class Locations { * @since 0.6.0 (added only for backwards compatibility, where locations are being created directly; previously in {@link Entities}). * @deprecated in 0.6.0; use {@link LocationManager#createLocation(LocationSpec)} instead. */ + @Deprecated public static void manage(Location loc, ManagementContext managementContext) { if (!managementContext.getLocationManager().isManaged(loc)) { log.warn("Deprecated use of unmanaged location ("+loc+"); will be managed automatically now but not supported in future versions"); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/EffectorUtils.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/EffectorUtils.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/EffectorUtils.java index 880a74b..88412d1 100644 --- a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/EffectorUtils.java +++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/EffectorUtils.java @@ -390,6 +390,7 @@ public class EffectorUtils { } /** @deprecated since 0.7.0 use {@link #getTaskFlagsForEffectorInvocation(Entity, Effector, ConfigBag)} */ + @Deprecated public static Map<Object,Object> getTaskFlagsForEffectorInvocation(Entity entity, Effector<?> effector) { return getTaskFlagsForEffectorInvocation(entity, effector, null); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindManagerImpl.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindManagerImpl.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindManagerImpl.java index 079a5cf..a3e663c 100644 --- a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindManagerImpl.java +++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindManagerImpl.java @@ -206,6 +206,7 @@ public class RebindManagerImpl implements RebindManager { /** * @deprecated since 0.7.0; use {@link #setPeriodicPersistPeriod(Duration)} */ + @Deprecated public void setPeriodicPersistPeriod(long periodMillis) { setPeriodicPersistPeriod(Duration.of(periodMillis, TimeUnit.MILLISECONDS)); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MementosGenerators.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MementosGenerators.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MementosGenerators.java index 658af0f..c638938 100644 --- a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MementosGenerators.java +++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MementosGenerators.java @@ -82,6 +82,7 @@ public class MementosGenerators { private static final Logger log = LoggerFactory.getLogger(MementosGenerators.class); /** @deprecated since 0.7.0 use {@link #newBasicMemento(BrooklynObject)} */ + @Deprecated public static Memento newMemento(BrooklynObject instance) { return newBasicMemento(instance); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MutableBrooklynMemento.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MutableBrooklynMemento.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MutableBrooklynMemento.java index fa0fe19..898fa91 100644 --- a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MutableBrooklynMemento.java +++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MutableBrooklynMemento.java @@ -43,6 +43,7 @@ import com.google.common.collect.Sets; /** * @deprecated since 0.7.0; this code will move to src/tests/java */ +@Deprecated @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE) public class MutableBrooklynMemento implements BrooklynMemento { http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/objs/AbstractEntityAdjunct.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/objs/AbstractEntityAdjunct.java b/core/src/main/java/org/apache/brooklyn/core/objs/AbstractEntityAdjunct.java index 636b7a6..21956f8 100644 --- a/core/src/main/java/org/apache/brooklyn/core/objs/AbstractEntityAdjunct.java +++ b/core/src/main/java/org/apache/brooklyn/core/objs/AbstractEntityAdjunct.java @@ -388,6 +388,7 @@ public abstract class AbstractEntityAdjunct extends AbstractBrooklynObject imple } /** @deprecated since 0.7.0 only {@link AbstractEnricher} has emit convenience */ + @Deprecated protected <T> void emit(Sensor<T> sensor, Object val) { checkState(entity != null, "entity must first be set"); if (val == Entities.UNCHANGED) { http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/plan/PlanToSpecTransformer.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/plan/PlanToSpecTransformer.java b/core/src/main/java/org/apache/brooklyn/core/plan/PlanToSpecTransformer.java index e88406c..ff1d33a 100644 --- a/core/src/main/java/org/apache/brooklyn/core/plan/PlanToSpecTransformer.java +++ b/core/src/main/java/org/apache/brooklyn/core/plan/PlanToSpecTransformer.java @@ -34,6 +34,7 @@ import com.google.common.annotations.Beta; * that is, different ways of taking an application plan and returning an {@link EntitySpec}, * and a {@link CatalogItem} and returning an {@link AbstractBrooklynObjectSpec}. * @deprecated since 0.9.0 use {@link BrooklynTypePlanTransformer} */ +@Deprecated @Beta public interface PlanToSpecTransformer extends ManagementContextInjectable { http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/sensor/DependentConfiguration.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/sensor/DependentConfiguration.java b/core/src/main/java/org/apache/brooklyn/core/sensor/DependentConfiguration.java index 906f854..97d3a53 100644 --- a/core/src/main/java/org/apache/brooklyn/core/sensor/DependentConfiguration.java +++ b/core/src/main/java/org/apache/brooklyn/core/sensor/DependentConfiguration.java @@ -754,6 +754,7 @@ public class DependentConfiguration { * If that entity report {@link Lifecycle#ON_FIRE} for its {@link Attributes#SERVICE_STATE_ACTUAL} then it will abort. * @deprecated since 0.7.0 use {@link DependentConfiguration#builder()} then {@link ProtoBuilder#attributeWhenReady(Entity, AttributeSensor)} then {@link #abortIfOnFire()} */ + @Deprecated @SuppressWarnings({ "unchecked", "rawtypes" }) public <T2> Builder<T2,T2> attributeWhenReady(Entity source, AttributeSensor<T2> sensor) { this.source = checkNotNull(source, "source"); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/core/server/BrooklynServerConfig.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/core/server/BrooklynServerConfig.java b/core/src/main/java/org/apache/brooklyn/core/server/BrooklynServerConfig.java index 84cdfdb..26d76dc 100644 --- a/core/src/main/java/org/apache/brooklyn/core/server/BrooklynServerConfig.java +++ b/core/src/main/java/org/apache/brooklyn/core/server/BrooklynServerConfig.java @@ -135,10 +135,12 @@ public class BrooklynServerConfig { } /** @deprecated since 0.7.0 use {@link BrooklynServerPaths#newMainPersistencePathResolver(ManagementContext)} */ + @Deprecated public static String getPersistenceDir(ManagementContext mgmt) { return getPersistenceDir(mgmt.getConfig()); } /** @deprecated since 0.7.0 use {@link BrooklynServerPaths#newMainPersistencePathResolver(ManagementContext)} */ + @Deprecated public static String getPersistenceDir(StringConfigMap brooklynProperties) { return resolvePersistencePath(null, brooklynProperties, null); } @@ -157,12 +159,14 @@ public class BrooklynServerConfig { * configured brooklyn.persistence.dir is not absolute * @return The container name or full path for where persist state should be kept * @deprecated since 0.7.0 use {@link BrooklynServerPaths#newMainPersistencePathResolver(ManagementContext)} */ + @Deprecated public static String resolvePersistencePath(String optionalSuppliedValue, StringConfigMap brooklynProperties, String optionalObjectStoreLocationSpec) { return BrooklynServerPaths.newMainPersistencePathResolver(brooklynProperties).location(optionalObjectStoreLocationSpec).dir(optionalSuppliedValue).resolve(); } /** @deprecated since 0.7.0 use {@link BrooklynServerPaths#getBrooklynWebTmpDir(ManagementContext)} */ + @Deprecated public static File getBrooklynWebTmpDir(ManagementContext mgmt) { return BrooklynServerPaths.getBrooklynWebTmpDir(mgmt); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/enricher/stock/AbstractAggregatingEnricher.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/enricher/stock/AbstractAggregatingEnricher.java b/core/src/main/java/org/apache/brooklyn/enricher/stock/AbstractAggregatingEnricher.java index a082201..65ca3dd 100644 --- a/core/src/main/java/org/apache/brooklyn/enricher/stock/AbstractAggregatingEnricher.java +++ b/core/src/main/java/org/apache/brooklyn/enricher/stock/AbstractAggregatingEnricher.java @@ -48,6 +48,7 @@ import com.google.common.collect.ImmutableMap; * @deprecated since 0.7.0; use {@link Enrichers.builder()} * @see Aggregator if need to sub-class */ +@Deprecated public abstract class AbstractAggregatingEnricher<S,T> extends AbstractEnricher implements SensorEventListener<S> { private static final Logger LOG = LoggerFactory.getLogger(AbstractAggregatingEnricher.class); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/enricher/stock/AbstractTransformingEnricher.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/enricher/stock/AbstractTransformingEnricher.java b/core/src/main/java/org/apache/brooklyn/enricher/stock/AbstractTransformingEnricher.java index a29cc7b..6378421 100644 --- a/core/src/main/java/org/apache/brooklyn/enricher/stock/AbstractTransformingEnricher.java +++ b/core/src/main/java/org/apache/brooklyn/enricher/stock/AbstractTransformingEnricher.java @@ -26,6 +26,7 @@ import org.apache.brooklyn.api.sensor.Sensor; * * @deprecated since 0.7.0; use {@link Enrichers.builder()} */ +@Deprecated public abstract class AbstractTransformingEnricher<T> extends AbstractTypeTransformingEnricher<T,T> { public AbstractTransformingEnricher() { // for rebinding http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/enricher/stock/AbstractTypeTransformingEnricher.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/enricher/stock/AbstractTypeTransformingEnricher.java b/core/src/main/java/org/apache/brooklyn/enricher/stock/AbstractTypeTransformingEnricher.java index 67769ec..47b9dcf 100644 --- a/core/src/main/java/org/apache/brooklyn/enricher/stock/AbstractTypeTransformingEnricher.java +++ b/core/src/main/java/org/apache/brooklyn/enricher/stock/AbstractTypeTransformingEnricher.java @@ -32,6 +32,7 @@ import org.apache.brooklyn.util.core.flags.SetFromFlag; * * @deprecated since 0.7.0; use {@link Enrichers.builder()} */ +@Deprecated public abstract class AbstractTypeTransformingEnricher<T,U> extends AbstractEnricher implements SensorEventListener<T> { @SetFromFlag http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/enricher/stock/AddingEnricher.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/enricher/stock/AddingEnricher.java b/core/src/main/java/org/apache/brooklyn/enricher/stock/AddingEnricher.java index 8a192c2..31195c0 100644 --- a/core/src/main/java/org/apache/brooklyn/enricher/stock/AddingEnricher.java +++ b/core/src/main/java/org/apache/brooklyn/enricher/stock/AddingEnricher.java @@ -44,6 +44,7 @@ import org.apache.brooklyn.core.sensor.BasicSensorEvent; * @deprecated since 0.7.0; use {@link Enrichers.builder()} * @see Combiner if need to sub-class */ +@Deprecated public class AddingEnricher extends AbstractEnricher implements SensorEventListener { private Sensor[] sources; http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/enricher/stock/CustomAggregatingEnricher.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/enricher/stock/CustomAggregatingEnricher.java b/core/src/main/java/org/apache/brooklyn/enricher/stock/CustomAggregatingEnricher.java index 5ff360f..de85ff8 100644 --- a/core/src/main/java/org/apache/brooklyn/enricher/stock/CustomAggregatingEnricher.java +++ b/core/src/main/java/org/apache/brooklyn/enricher/stock/CustomAggregatingEnricher.java @@ -42,6 +42,7 @@ import com.google.common.reflect.TypeToken; * * @deprecated since 0.7.0; use {@link Enrichers#builder()} */ +@Deprecated public class CustomAggregatingEnricher<S,T> extends AbstractAggregatingEnricher<S,T> implements SensorEventListener<S> { private static final Logger LOG = LoggerFactory.getLogger(CustomAggregatingEnricher.class); @@ -146,6 +147,7 @@ public class CustomAggregatingEnricher<S,T> extends AbstractAggregatingEnricher< * * @deprecated since 0.7.0; use {@link Enrichers#builder()} */ + @Deprecated public static <S,T> CustomAggregatingEnricher<S,T> newEnricher( Map<String,?> flags, AttributeSensor<S> source, AttributeSensor<T> target, Closure<?> aggregator, S defaultVal) { return new CustomAggregatingEnricher<S,T>(flags, source, target, aggregator, defaultVal); @@ -183,6 +185,7 @@ public class CustomAggregatingEnricher<S,T> extends AbstractAggregatingEnricher< * * @deprecated since 0.7.0; use {@link Enrichers#builder()} */ + @Deprecated public static <S,T> CustomAggregatingEnricher<S,T> newEnricher( Map<String,?> flags, AttributeSensor<S> source, AttributeSensor<T> target, Function<Collection<S>, T> aggregator, S defaultVal) { return new CustomAggregatingEnricher<S,T>(flags, source, target, aggregator, defaultVal); @@ -225,6 +228,7 @@ public class CustomAggregatingEnricher<S,T> extends AbstractAggregatingEnricher< * * @deprecated since 0.7.0; use {@link Enrichers#builder()} */ + @Deprecated public static <N extends Number, T extends Number> CustomAggregatingEnricher<N,T> newSummingEnricher( Map<String,?> flags, AttributeSensor<N> source, final AttributeSensor<T> target, final N defaultValueForUnreportedSensors, final T valueToReportIfNoSensors) { @@ -267,6 +271,7 @@ public class CustomAggregatingEnricher<S,T> extends AbstractAggregatingEnricher< * * @deprecated since 0.7.0; use {@link Enrichers#builder()} */ + @Deprecated public static <N extends Number> CustomAggregatingEnricher<N,Double> newAveragingEnricher( Map<String,?> flags, AttributeSensor<? extends N> source, final AttributeSensor<Double> target, final N defaultValueForUnreportedSensors, final Double valueToReportIfNoSensors) { http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/enricher/stock/SensorPropagatingEnricher.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/enricher/stock/SensorPropagatingEnricher.java b/core/src/main/java/org/apache/brooklyn/enricher/stock/SensorPropagatingEnricher.java index 304756e..bb7f2ab 100644 --- a/core/src/main/java/org/apache/brooklyn/enricher/stock/SensorPropagatingEnricher.java +++ b/core/src/main/java/org/apache/brooklyn/enricher/stock/SensorPropagatingEnricher.java @@ -47,6 +47,7 @@ import com.google.common.collect.Sets; * * @see Propagator if need to sub-class */ +@Deprecated public class SensorPropagatingEnricher extends AbstractEnricher implements SensorEventListener<Object> { public static final Logger log = LoggerFactory.getLogger(SensorPropagatingEnricher.class); @@ -92,6 +93,7 @@ public class SensorPropagatingEnricher extends AbstractEnricher implements Senso * * @deprecated since 0.7.0; use {@link Enrichers#builder()} */ + @Deprecated public static SensorPropagatingEnricher newInstanceRenaming(Entity source, Map<? extends Sensor<?>, ? extends Sensor<?>> sensors) { return new SensorPropagatingEnricher(source, sensors); } @@ -99,6 +101,7 @@ public class SensorPropagatingEnricher extends AbstractEnricher implements Senso /** * @deprecated since 0.7.0; use {@link Enrichers#builder()} */ + @Deprecated public SensorPropagatingEnricher(Entity source, Sensor<?>... sensors) { this(source, ImmutableList.copyOf(sensors)); } @@ -116,6 +119,7 @@ public class SensorPropagatingEnricher extends AbstractEnricher implements Senso * * @deprecated since 0.7.0; use {@link Enrichers#builder()} */ + @Deprecated public SensorPropagatingEnricher(Entity source, Collection<Sensor<?>> sensors) { this.source = source; this.sensors = ImmutableSet.copyOf(sensors); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/enricher/stock/SensorTransformingEnricher.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/enricher/stock/SensorTransformingEnricher.java b/core/src/main/java/org/apache/brooklyn/enricher/stock/SensorTransformingEnricher.java index 339d9b8..920d232 100644 --- a/core/src/main/java/org/apache/brooklyn/enricher/stock/SensorTransformingEnricher.java +++ b/core/src/main/java/org/apache/brooklyn/enricher/stock/SensorTransformingEnricher.java @@ -34,6 +34,7 @@ import com.google.common.base.Function; * @deprecated since 0.7.0; use {@link Enrichers.builder()} * @see Transformer if need to sub-class */ +@Deprecated public class SensorTransformingEnricher<T,U> extends AbstractTypeTransformingEnricher { private Function<? super T, ? extends U> transformation; @@ -92,6 +93,7 @@ public class SensorTransformingEnricher<T,U> extends AbstractTypeTransformingEnr * * @deprecated since 0.7.0; use {@link Enrichers.builder()} */ + @Deprecated public static <U,V> SensorTransformingEnricher<U,V> newInstanceTransforming(Entity producer, AttributeSensor<U> source, Function<U,V> transformation, AttributeSensor<V> target) { return new SensorTransformingEnricher<U,V>(producer, source, target, transformation); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/entity/stock/BasicStartable.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/entity/stock/BasicStartable.java b/core/src/main/java/org/apache/brooklyn/entity/stock/BasicStartable.java index 12ad993..1fc2721 100644 --- a/core/src/main/java/org/apache/brooklyn/entity/stock/BasicStartable.java +++ b/core/src/main/java/org/apache/brooklyn/entity/stock/BasicStartable.java @@ -48,6 +48,7 @@ public interface BasicStartable extends Entity, Startable { @Deprecated public interface LocationsFilter extends Locations.LocationsFilter { /** @deprecated since 0.7.0; use {@link Locations#USE_FIRST_LOCATION} */ + @Deprecated public static final LocationsFilter USE_FIRST_LOCATION = new LocationsFilter() { private static final long serialVersionUID = 3100091615409115890L; http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/feed/function/FunctionPollConfig.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/feed/function/FunctionPollConfig.java b/core/src/main/java/org/apache/brooklyn/feed/function/FunctionPollConfig.java index f9320a7..bd7c2bc 100644 --- a/core/src/main/java/org/apache/brooklyn/feed/function/FunctionPollConfig.java +++ b/core/src/main/java/org/apache/brooklyn/feed/function/FunctionPollConfig.java @@ -84,6 +84,7 @@ public class FunctionPollConfig<S, T> extends PollConfig<S, T, FunctionPollConfi } /** @deprecated since 0.7.0, kept for legacy compatibility when deserializing */ + @Deprecated @SuppressWarnings({ "unchecked", "unused" }) private <newS> FunctionPollConfig<newS, T> supplierLegacy(final Supplier<? extends newS> val) { checkNotNull(val, "supplier"); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/feed/http/HttpValueFunctions.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/feed/http/HttpValueFunctions.java b/core/src/main/java/org/apache/brooklyn/feed/http/HttpValueFunctions.java index 9ad3b34..d45daf1 100644 --- a/core/src/main/java/org/apache/brooklyn/feed/http/HttpValueFunctions.java +++ b/core/src/main/java/org/apache/brooklyn/feed/http/HttpValueFunctions.java @@ -38,6 +38,7 @@ public class HttpValueFunctions { } /** @deprecated since 0.7.0; only here for deserialization of persisted state */ + @Deprecated private static Function<HttpToolResponse, Integer> responseCodeLegacy() { // TODO PERSISTENCE WORKAROUND kept anonymous function in case referenced in persisted state return new Function<HttpToolResponse, Integer>() { @@ -70,6 +71,7 @@ public class HttpValueFunctions { } /** @deprecated since 0.7.0; only here for deserialization of persisted state */ + @Deprecated private static Function<HttpToolResponse, String> stringContentsFunctionLegacy() { // TODO PERSISTENCE WORKAROUND kept anonymous function in case referenced in persisted state return new Function<HttpToolResponse, String>() { @@ -106,6 +108,7 @@ public class HttpValueFunctions { } /** @deprecated since 0.7.0; only here for deserialization of persisted state */ + @Deprecated private static Function<HttpToolResponse, Long> latencyLegacy() { // TODO PERSISTENCE WORKAROUND kept anonymous function in case referenced in persisted state return new Function<HttpToolResponse, Long>() { http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/feed/ssh/SshPollConfig.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/feed/ssh/SshPollConfig.java b/core/src/main/java/org/apache/brooklyn/feed/ssh/SshPollConfig.java index e75a5d9..1df98e9 100644 --- a/core/src/main/java/org/apache/brooklyn/feed/ssh/SshPollConfig.java +++ b/core/src/main/java/org/apache/brooklyn/feed/ssh/SshPollConfig.java @@ -67,6 +67,7 @@ public class SshPollConfig<T> extends PollConfig<SshPollValue, T, SshPollConfig< } /** @deprecated since 0.7.0; use {@link #getCommandSupplier()} and resolve just-in-time */ + @Deprecated public String getCommand() { return getCommandSupplier().get(); } @@ -75,6 +76,7 @@ public class SshPollConfig<T> extends PollConfig<SshPollValue, T, SshPollConfig< } /** @deprecated since 0.7.0; use {@link #getEnvSupplier()} and resolve just-in-time */ + @Deprecated public Map<String, String> getEnv() { return getEnvSupplier().get(); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/feed/ssh/SshValueFunctions.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/feed/ssh/SshValueFunctions.java b/core/src/main/java/org/apache/brooklyn/feed/ssh/SshValueFunctions.java index 20a95c2..f73f604 100644 --- a/core/src/main/java/org/apache/brooklyn/feed/ssh/SshValueFunctions.java +++ b/core/src/main/java/org/apache/brooklyn/feed/ssh/SshValueFunctions.java @@ -120,6 +120,7 @@ public class SshValueFunctions { /** * @deprecated since 0.9.0; use {@link Functionals#chain(Function, Function)} */ + @Deprecated public static <A,B,C> Function<A,C> chain(final Function<A,? extends B> f1, final Function<B,C> f2) { return Functionals.chain(f1, f2); } @@ -127,6 +128,7 @@ public class SshValueFunctions { /** * @deprecated since 0.9.0; use {@link Functionals#chain(Function, Function, Function)} */ + @Deprecated public static <A,B,C,D> Function<A,D> chain(final Function<A,? extends B> f1, final Function<B,? extends C> f2, final Function<C,D> f3) { return Functionals.chain(f1, f2, f3); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/location/localhost/LocalhostMachineProvisioningLocation.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/location/localhost/LocalhostMachineProvisioningLocation.java b/core/src/main/java/org/apache/brooklyn/location/localhost/LocalhostMachineProvisioningLocation.java index 59b5fe9..950897e 100644 --- a/core/src/main/java/org/apache/brooklyn/location/localhost/LocalhostMachineProvisioningLocation.java +++ b/core/src/main/java/org/apache/brooklyn/location/localhost/LocalhostMachineProvisioningLocation.java @@ -114,6 +114,7 @@ public class LocalhostMachineProvisioningLocation extends FixedListMachineProvis * @deprecated since 0.6 * @see #LocalhostMachineProvisioningLocation() */ + @Deprecated public LocalhostMachineProvisioningLocation(Map properties) { super(properties); } @@ -265,6 +266,7 @@ public class LocalhostMachineProvisioningLocation extends FixedListMachineProvis super(); } /** @deprecated since 0.6.0 use no-arg constructor (and spec) then configure */ + @Deprecated public LocalhostMachine(Map properties) { super(MutableMap.builder().putAll(properties).put("mutexSupport", mutexSupport).build()); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/util/core/BrooklynLanguageExtensions.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/util/core/BrooklynLanguageExtensions.java b/core/src/main/java/org/apache/brooklyn/util/core/BrooklynLanguageExtensions.java index 6e4958a..05b53d3 100644 --- a/core/src/main/java/org/apache/brooklyn/util/core/BrooklynLanguageExtensions.java +++ b/core/src/main/java/org/apache/brooklyn/util/core/BrooklynLanguageExtensions.java @@ -23,6 +23,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import org.apache.brooklyn.core.internal.BrooklynInitialization; /** @deprecated since 0.7.0 use {@link BrooklynInitialization} */ +@Deprecated public class BrooklynLanguageExtensions { private BrooklynLanguageExtensions() {} http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/util/core/flags/FlagUtils.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/util/core/flags/FlagUtils.java b/core/src/main/java/org/apache/brooklyn/util/core/flags/FlagUtils.java index 9a78ce5..0d4cc74 100644 --- a/core/src/main/java/org/apache/brooklyn/util/core/flags/FlagUtils.java +++ b/core/src/main/java/org/apache/brooklyn/util/core/flags/FlagUtils.java @@ -147,6 +147,7 @@ public class FlagUtils { /** sets _all_ accessible _{@link ConfigKey}_ and {@link HasConfigKey} fields on the given object, * using the indicated flags/config-bag * @deprecated since 0.7.0 use {@link #setAllConfigKeys(Map, Configurable, boolean)} */ + @Deprecated public static Map<String, ?> setAllConfigKeys(Map<String, ?> flagsOrConfig, Configurable instance) { return setAllConfigKeys(flagsOrConfig, instance, false); } @@ -161,6 +162,7 @@ public class FlagUtils { /** sets _all_ accessible _{@link ConfigKey}_ and {@link HasConfigKey} fields on the given object, * using the indicated flags/config-bag * @deprecated since 0.7.0 use {@link #setAllConfigKeys(Configurable, ConfigBag, boolean)} */ + @Deprecated public static void setAllConfigKeys(Configurable o, ConfigBag bag) { setAllConfigKeys(o, bag, false); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/util/core/flags/TypeCoercions.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/util/core/flags/TypeCoercions.java b/core/src/main/java/org/apache/brooklyn/util/core/flags/TypeCoercions.java index 5eb9141..95d1767 100644 --- a/core/src/main/java/org/apache/brooklyn/util/core/flags/TypeCoercions.java +++ b/core/src/main/java/org/apache/brooklyn/util/core/flags/TypeCoercions.java @@ -208,6 +208,7 @@ public class TypeCoercions { } /** @deprecated since 0.10.0 see {@link Boxing#PRIMITIVE_TO_BOXED} and its <code>inverse()</code> method */ + @Deprecated @SuppressWarnings("rawtypes") public static final Map<Class,Class> BOXED_TO_UNBOXED_TYPES = ImmutableMap.<Class,Class>builder(). put(Integer.class, Integer.TYPE). http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/util/core/internal/Repeater.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/util/core/internal/Repeater.java b/core/src/main/java/org/apache/brooklyn/util/core/internal/Repeater.java index 422f31c..5f7973f 100644 --- a/core/src/main/java/org/apache/brooklyn/util/core/internal/Repeater.java +++ b/core/src/main/java/org/apache/brooklyn/util/core/internal/Repeater.java @@ -203,6 +203,7 @@ public class Repeater { * @see #every(long, TimeUnit) * @deprecated specify unit */ + @Deprecated public Repeater every(long duration) { return every(duration, TimeUnit.MILLISECONDS); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/SshAbstractTool.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/SshAbstractTool.java b/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/SshAbstractTool.java index 033e7ea..612ccff 100644 --- a/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/SshAbstractTool.java +++ b/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/SshAbstractTool.java @@ -109,6 +109,7 @@ public abstract class SshAbstractTool extends ShellAbstractTool implements SshTo this.privateKeyPassphrase = val; return self(); } /** @deprecated 1.4.0, use privateKeyData */ + @Deprecated public B privateKey(String val) { this.privateKeyData = val; return self(); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/SshTool.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/SshTool.java b/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/SshTool.java index ee1a626..3ebc130 100644 --- a/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/SshTool.java +++ b/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/SshTool.java @@ -106,6 +106,7 @@ public interface SshTool extends ShellTool { * @param maxAttempts * @throws SshException */ + @Deprecated public void connect(int maxAttempts); public void disconnect(); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/sshj/SshjClientConnection.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/sshj/SshjClientConnection.java b/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/sshj/SshjClientConnection.java index bd5943e..03a4ed0 100644 --- a/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/sshj/SshjClientConnection.java +++ b/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/sshj/SshjClientConnection.java @@ -74,6 +74,7 @@ public class SshjClientConnection implements SshAction<SSHClient> { } /** @deprecated use privateKeyData */ + @Deprecated public Builder privateKey(String val) { this.privateKeyData = val; return this; http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/main/java/org/apache/brooklyn/util/core/task/TaskPredicates.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/brooklyn/util/core/task/TaskPredicates.java b/core/src/main/java/org/apache/brooklyn/util/core/task/TaskPredicates.java index d8d3764..9c2f7b0 100644 --- a/core/src/main/java/org/apache/brooklyn/util/core/task/TaskPredicates.java +++ b/core/src/main/java/org/apache/brooklyn/util/core/task/TaskPredicates.java @@ -28,6 +28,7 @@ import com.google.common.base.Predicates; public class TaskPredicates { /** @deprecated since 0.9.0; use {@link #displayNameSatisfies(Predicate)} */ + @Deprecated public static Predicate<Task<?>> displayNameMatches(Predicate<? super String> matcher) { return displayNameSatisfies(matcher); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindEntityTest.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindEntityTest.java b/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindEntityTest.java index 7945d77..f46bd73 100644 --- a/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindEntityTest.java +++ b/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindEntityTest.java @@ -674,6 +674,7 @@ public class RebindEntityTest extends RebindTestFixtureWithApp { /** * @deprecated since 0.7; support for rebinding old-style entities is deprecated */ + @Deprecated @Test public void testHandlesOldStyleEntity() throws Exception { MyOldStyleEntity origE = new MyOldStyleEntity(MutableMap.of("confName", "myval"), origApp); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindLocationTest.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindLocationTest.java b/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindLocationTest.java index 42b1ec2..8612afe 100644 --- a/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindLocationTest.java +++ b/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindLocationTest.java @@ -224,6 +224,7 @@ public class RebindLocationTest extends RebindTestFixtureWithApp { /** * @deprecated since 0.7; support for rebinding old-style locations is deprecated */ + @Deprecated @Test public void testHandlesOldStyleLocation() throws Exception { MyOldStyleLocation origLoc = new MyOldStyleLocation(ImmutableMap.of("myfield", "myval")); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/launcher-common/src/main/java/org/apache/brooklyn/launcher/common/BasicLauncher.java ---------------------------------------------------------------------- diff --git a/launcher-common/src/main/java/org/apache/brooklyn/launcher/common/BasicLauncher.java b/launcher-common/src/main/java/org/apache/brooklyn/launcher/common/BasicLauncher.java index 14e651b..7b16184 100644 --- a/launcher-common/src/main/java/org/apache/brooklyn/launcher/common/BasicLauncher.java +++ b/launcher-common/src/main/java/org/apache/brooklyn/launcher/common/BasicLauncher.java @@ -173,6 +173,7 @@ public class BasicLauncher<T extends BasicLauncher<T>> { * @deprecated since 0.9.0; instead use {@link #application(String)} for YAML apps, or {@link #application(EntitySpec)}. * Note that apps are now auto-managed on construction through EntitySpec/YAML. */ + @Deprecated public T application(org.apache.brooklyn.core.entity.factory.ApplicationBuilder appBuilder) { LOG.warn("Caller supplied ApplicationBuilder; convert to EntitySpec as this style builder may not be supported in future."); appBuildersToManage.add(checkNotNull(appBuilder, "appBuilder")); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynWebServer.java ---------------------------------------------------------------------- diff --git a/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynWebServer.java b/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynWebServer.java index 933ce68..eff12d5 100644 --- a/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynWebServer.java +++ b/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynWebServer.java @@ -340,6 +340,7 @@ public class BrooklynWebServer { } /** @deprecated use setAttribute */ + @Deprecated public BrooklynWebServer addAttribute(String field, Object value) { return setAttribute(field, value); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsPredicates.java ---------------------------------------------------------------------- diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsPredicates.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsPredicates.java index 7fe8ee3..3143e59 100644 --- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsPredicates.java +++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsPredicates.java @@ -33,6 +33,7 @@ public class JcloudsPredicates { * @deprecated since 0.9.0; direct access strongly discouraged; will be made protected in future release; * use {@link JcloudsPredicates#nodeInLocation(String, boolean)} */ + @Deprecated public static class NodeInLocation implements Predicate<ComputeMetadata> { private final String regionId; private final boolean matchNullLocations; http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsUtil.java ---------------------------------------------------------------------- diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsUtil.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsUtil.java index 2336c0f..b3a13be 100644 --- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsUtil.java +++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsUtil.java @@ -325,6 +325,7 @@ public class JcloudsUtil implements JcloudsLocationConfig { /** * @deprecated since 0.9.0; use {@link #getFirstReachableAddress(NodeMetadata, Duration)} */ + @Deprecated public static String getFirstReachableAddress(ComputeServiceContext context, NodeMetadata node) { // Previously this called jclouds `sshForNode().apply(Node)` to check all IPs of node (private+public), // to find one that is reachable. It does `openSocketFinder.findOpenSocketOnNode(node, node.getLoginPort(), ...)`. http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/policy/src/main/java/org/apache/brooklyn/policy/enricher/RollingTimeWindowMeanEnricher.java ---------------------------------------------------------------------- diff --git a/policy/src/main/java/org/apache/brooklyn/policy/enricher/RollingTimeWindowMeanEnricher.java b/policy/src/main/java/org/apache/brooklyn/policy/enricher/RollingTimeWindowMeanEnricher.java index 887ff32..b59fdd0 100644 --- a/policy/src/main/java/org/apache/brooklyn/policy/enricher/RollingTimeWindowMeanEnricher.java +++ b/policy/src/main/java/org/apache/brooklyn/policy/enricher/RollingTimeWindowMeanEnricher.java @@ -106,6 +106,7 @@ public class RollingTimeWindowMeanEnricher<T extends Number> extends AbstractTyp } /** @deprecated since 0.6.0 use Duration parameter rather than long with millis */ + @Deprecated public RollingTimeWindowMeanEnricher(Entity producer, AttributeSensor<T> source, AttributeSensor<Double> target, long timePeriod) { this(producer, source, target, Duration.millis(timePeriod)); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/rest/rest-api/src/main/java/org/apache/brooklyn/rest/domain/LocationSpec.java ---------------------------------------------------------------------- diff --git a/rest/rest-api/src/main/java/org/apache/brooklyn/rest/domain/LocationSpec.java b/rest/rest-api/src/main/java/org/apache/brooklyn/rest/domain/LocationSpec.java index 2947df1..b43b2bd 100644 --- a/rest/rest-api/src/main/java/org/apache/brooklyn/rest/domain/LocationSpec.java +++ b/rest/rest-api/src/main/java/org/apache/brooklyn/rest/domain/LocationSpec.java @@ -32,6 +32,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; // FIXME change name, due to confusion with LocationSpec <- no need, as we can kill the class instead soon! /** @deprecated since 0.7.0 location spec objects will not be used from the client, instead pass yaml location spec strings */ +@Deprecated public class LocationSpec implements HasName, HasConfig, Serializable { private static final long serialVersionUID = -1562824224808185255L; http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/filter/HaHotCheckResourceFilter.java ---------------------------------------------------------------------- diff --git a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/filter/HaHotCheckResourceFilter.java b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/filter/HaHotCheckResourceFilter.java index cb55875..2971378 100644 --- a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/filter/HaHotCheckResourceFilter.java +++ b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/filter/HaHotCheckResourceFilter.java @@ -113,6 +113,7 @@ public class HaHotCheckResourceFilter implements ContainerRequestFilter { } /** @deprecated since 0.9.0 use {@link BrooklynRestResourceUtils#getProblemMessageIfServerNotRunning(ManagementContext)} */ + @Deprecated public static String lookForProblemIfServerNotRunning(ManagementContext mgmt) { return HaHotCheckHelperAbstract.getProblemMessageIfServerNotRunning(mgmt).orNull(); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/LocationResource.java ---------------------------------------------------------------------- diff --git a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/LocationResource.java b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/LocationResource.java index f5cf487..80bd2d5 100644 --- a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/LocationResource.java +++ b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/resources/LocationResource.java @@ -123,6 +123,7 @@ public class LocationResource extends AbstractBrooklynRestResource implements Lo } /** @deprecated since 0.7.0; REST call now handled by below (optional query parameter added) */ + @Deprecated public LocationSummary get(String locationId) { return get(locationId, false); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/util/URLParamEncoder.java ---------------------------------------------------------------------- diff --git a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/util/URLParamEncoder.java b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/util/URLParamEncoder.java index 8c25fda..55ff4d3 100644 --- a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/util/URLParamEncoder.java +++ b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/util/URLParamEncoder.java @@ -22,6 +22,7 @@ package org.apache.brooklyn.rest.util; /** * @deprecated since 0.7.0 use {@link org.apache.brooklyn.util.net.URLParamEncoder} */ +@Deprecated public class URLParamEncoder extends org.apache.brooklyn.util.net.URLParamEncoder { } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/testing/mocks/RestMockAppBuilder.java ---------------------------------------------------------------------- diff --git a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/testing/mocks/RestMockAppBuilder.java b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/testing/mocks/RestMockAppBuilder.java index e4ae595..affb3f3 100644 --- a/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/testing/mocks/RestMockAppBuilder.java +++ b/rest/rest-resources/src/test/java/org/apache/brooklyn/rest/testing/mocks/RestMockAppBuilder.java @@ -25,6 +25,7 @@ import org.apache.brooklyn.core.entity.factory.ApplicationBuilder; import org.apache.brooklyn.util.javalang.Reflections; /** @deprecated since 0.9.0 don't use {@link ApplicationBuilder} */ +@Deprecated public class RestMockAppBuilder extends ApplicationBuilder { public RestMockAppBuilder() { http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/rest/rest-server/src/test/java/org/apache/brooklyn/rest/BrooklynRestApiLauncherTestFixture.java ---------------------------------------------------------------------- diff --git a/rest/rest-server/src/test/java/org/apache/brooklyn/rest/BrooklynRestApiLauncherTestFixture.java b/rest/rest-server/src/test/java/org/apache/brooklyn/rest/BrooklynRestApiLauncherTestFixture.java index 5a102bc..b84dbcf 100644 --- a/rest/rest-server/src/test/java/org/apache/brooklyn/rest/BrooklynRestApiLauncherTestFixture.java +++ b/rest/rest-server/src/test/java/org/apache/brooklyn/rest/BrooklynRestApiLauncherTestFixture.java @@ -114,6 +114,7 @@ public abstract class BrooklynRestApiLauncherTestFixture { } /** @deprecated since 0.9.0 use {@link #getBaseUriHostAndPost(Server)} or {@link #getBaseUriRest(Server)} */ + @Deprecated public static String getBaseUri(Server server) { return getBaseUriHostAndPost(server); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/software/base/src/main/java/org/apache/brooklyn/entity/software/base/AbstractSoftwareProcessWinRmDriver.java ---------------------------------------------------------------------- diff --git a/software/base/src/main/java/org/apache/brooklyn/entity/software/base/AbstractSoftwareProcessWinRmDriver.java b/software/base/src/main/java/org/apache/brooklyn/entity/software/base/AbstractSoftwareProcessWinRmDriver.java index a10f699..9b625a3 100644 --- a/software/base/src/main/java/org/apache/brooklyn/entity/software/base/AbstractSoftwareProcessWinRmDriver.java +++ b/software/base/src/main/java/org/apache/brooklyn/entity/software/base/AbstractSoftwareProcessWinRmDriver.java @@ -197,6 +197,7 @@ public abstract class AbstractSoftwareProcessWinRmDriver extends AbstractSoftwar * } * </pre> */ + @Deprecated protected String getEntityVersionLabel() { return getEntityVersionLabel("_"); } @@ -204,6 +205,7 @@ public abstract class AbstractSoftwareProcessWinRmDriver extends AbstractSoftwar /** * @deprecated since 0.5.0; instead rely on {@link org.apache.brooklyn.api.entity.drivers.downloads.DownloadResolverManager} to inc */ + @Deprecated protected String getEntityVersionLabel(String separator) { return elvis(entity.getEntityType().getSimpleName(), entity.getClass().getName())+(getVersion() != null ? separator+getVersion() : ""); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/software/base/src/main/java/org/apache/brooklyn/feed/jmx/JmxNotificationFilters.java ---------------------------------------------------------------------- diff --git a/software/base/src/main/java/org/apache/brooklyn/feed/jmx/JmxNotificationFilters.java b/software/base/src/main/java/org/apache/brooklyn/feed/jmx/JmxNotificationFilters.java index 4b5d3b6..0b9e0b2 100644 --- a/software/base/src/main/java/org/apache/brooklyn/feed/jmx/JmxNotificationFilters.java +++ b/software/base/src/main/java/org/apache/brooklyn/feed/jmx/JmxNotificationFilters.java @@ -53,6 +53,7 @@ public class JmxNotificationFilters { * to that JVM). So of very limited use in real-world java processes to be managed. * Therefore this will be deleted to avoid people hitting this surprising behaviour. */ + @Deprecated @SuppressWarnings("serial") public static NotificationFilter matchesTypeRegex(final String typeRegex) { return new NotificationFilter() { http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/jmx/JmxService.java ---------------------------------------------------------------------- diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/jmx/JmxService.java b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/jmx/JmxService.java index 9b88307..aee36af 100644 --- a/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/jmx/JmxService.java +++ b/software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/jmx/JmxService.java @@ -76,6 +76,7 @@ public class JmxService { /** * @deprecated since 0.6.0; either needs abandoning, or updating to support JmxSupport (and JmxmpAgent, etc) */ + @Deprecated public JmxService(Entity e) throws Exception { this(e.getAttribute(Attributes.HOSTNAME) != null ? e.getAttribute(Attributes.HOSTNAME) : "localhost", e.getAttribute(UsesJmx.JMX_PORT) != null ? e.getAttribute(UsesJmx.JMX_PORT) : null); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/test-support/src/main/java/org/apache/brooklyn/test/TestUtils.java ---------------------------------------------------------------------- diff --git a/test-support/src/main/java/org/apache/brooklyn/test/TestUtils.java b/test-support/src/main/java/org/apache/brooklyn/test/TestUtils.java index 01ca0f9..40fd53f 100644 --- a/test-support/src/main/java/org/apache/brooklyn/test/TestUtils.java +++ b/test-support/src/main/java/org/apache/brooklyn/test/TestUtils.java @@ -41,6 +41,7 @@ public class TestUtils { private TestUtils() { } /** @deprecated since 0.8; use Asserts.BooleanWithMessage */ + @Deprecated public static class BooleanWithMessage { boolean value; String message; public BooleanWithMessage(boolean value, String message) { @@ -56,6 +57,7 @@ public class TestUtils { } /** @deprecated since 0.8; use Exceptions.getFirstInteresting */ + @Deprecated public static Throwable unwrapThrowable(Throwable t) { if (t.getCause() == null) { return t; @@ -69,6 +71,7 @@ public class TestUtils { } /** @deprecated since 0.8; use Asserts.assertEqualsIgnoringOrder */ + @Deprecated public static void assertSetsEqual(Collection c1, Collection c2) { Set s = new LinkedHashSet(); s.addAll(c1); s.removeAll(c2); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/utils/common/src/main/java/org/apache/brooklyn/util/collections/TimeWindowedList.java ---------------------------------------------------------------------- diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/collections/TimeWindowedList.java b/utils/common/src/main/java/org/apache/brooklyn/util/collections/TimeWindowedList.java index 570c2ed..246dec1 100644 --- a/utils/common/src/main/java/org/apache/brooklyn/util/collections/TimeWindowedList.java +++ b/utils/common/src/main/java/org/apache/brooklyn/util/collections/TimeWindowedList.java @@ -50,6 +50,7 @@ public class TimeWindowedList<T> { /** * @deprecated since 0.7.0; use {@link #TimeWindowedList(Duration)} */ + @Deprecated public TimeWindowedList(long timePeriod) { this(Duration.millis(timePeriod)); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/utils/common/src/main/java/org/apache/brooklyn/util/exceptions/Exceptions.java ---------------------------------------------------------------------- diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/exceptions/Exceptions.java b/utils/common/src/main/java/org/apache/brooklyn/util/exceptions/Exceptions.java index 279d22c..ee49b4a 100644 --- a/utils/common/src/main/java/org/apache/brooklyn/util/exceptions/Exceptions.java +++ b/utils/common/src/main/java/org/apache/brooklyn/util/exceptions/Exceptions.java @@ -342,6 +342,7 @@ public class Exceptions { /** removes uninteresting items from the top of the call stack (but keeps interesting messages), and throws * @deprecated since 0.7.0 same as {@link #propagate(Throwable)} */ + @Deprecated public static RuntimeException propagateCollapsed(Throwable source) { throw propagate(source); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/utils/common/src/main/java/org/apache/brooklyn/util/math/MathFunctions.java ---------------------------------------------------------------------- diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/math/MathFunctions.java b/utils/common/src/main/java/org/apache/brooklyn/util/math/MathFunctions.java index 671078b..fded95b 100644 --- a/utils/common/src/main/java/org/apache/brooklyn/util/math/MathFunctions.java +++ b/utils/common/src/main/java/org/apache/brooklyn/util/math/MathFunctions.java @@ -283,6 +283,7 @@ public class MathFunctions { /** * @deprecated since 0.9.0; use {@link Functionals#chain(Function, Function)} and {@link MathFunctions#divide(double)} */ + @Deprecated public static <T> Function<T, Double> divide(final Function<T, ? extends Number> preprocessor, final double divisor) { return Functionals.chain(preprocessor, divide(divisor)); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/utils/common/src/main/java/org/apache/brooklyn/util/repeat/Repeater.java ---------------------------------------------------------------------- diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/repeat/Repeater.java b/utils/common/src/main/java/org/apache/brooklyn/util/repeat/Repeater.java index a7fdc42..2739bcf 100644 --- a/utils/common/src/main/java/org/apache/brooklyn/util/repeat/Repeater.java +++ b/utils/common/src/main/java/org/apache/brooklyn/util/repeat/Repeater.java @@ -112,6 +112,7 @@ public class Repeater implements Callable<Boolean> { * @deprecated since 0.7.0 this is no-op, as the repeater defaults to repeating nothing, simply remove the call, * using just <code>Repeater.until(...)</code>. */ + @Deprecated public Repeater repeat() { return repeat(Callables.returning(null)); } http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dfa8aa29/utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java ---------------------------------------------------------------------- diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java b/utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java index 69f692e..193a0d0 100644 --- a/utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java +++ b/utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java @@ -119,6 +119,7 @@ public class BashCommands { /** sudo to a given user and run the indicated command; * @deprecated since 0.7.0 semantics of this are fiddly, e.g. whether user gets their environment */ + @Deprecated @Beta public static String sudoAsUser(String user, String command) { return sudoAsUserOld(user, command);