Sho SHIMIZU
Committed by Gerrit Code Review

Make the old resource APIs deprecated

Change-Id: Ib3158f3f363c928353f6ef82aac98a8e4e589953
Showing 23 changed files with 76 additions and 0 deletions
...@@ -23,7 +23,10 @@ import static com.google.common.base.Preconditions.checkNotNull; ...@@ -23,7 +23,10 @@ import static com.google.common.base.Preconditions.checkNotNull;
23 23
24 /** 24 /**
25 * Representation of bandwidth resource in bps. 25 * Representation of bandwidth resource in bps.
26 + *
27 + * @deprecated in Emu Release
26 */ 28 */
29 +@Deprecated
27 public final class BandwidthResource implements LinkResource { 30 public final class BandwidthResource implements LinkResource {
28 31
29 private final Bandwidth bandwidth; 32 private final Bandwidth bandwidth;
......
...@@ -23,7 +23,10 @@ import java.util.Objects; ...@@ -23,7 +23,10 @@ import java.util.Objects;
23 23
24 /** 24 /**
25 * Representation of allocated bandwidth resource. 25 * Representation of allocated bandwidth resource.
26 + *
27 + * @deprecated in Emu Release
26 */ 28 */
29 +@Deprecated
27 public class BandwidthResourceAllocation implements ResourceAllocation { 30 public class BandwidthResourceAllocation implements ResourceAllocation {
28 private final BandwidthResource bandwidth; 31 private final BandwidthResource bandwidth;
29 32
......
...@@ -23,7 +23,10 @@ import org.onosproject.net.resource.ResourceType; ...@@ -23,7 +23,10 @@ import org.onosproject.net.resource.ResourceType;
23 23
24 /** 24 /**
25 * Representation of a request for bandwidth resource. 25 * Representation of a request for bandwidth resource.
26 + *
27 + * @deprecated in Emu Release
26 */ 28 */
29 +@Deprecated
27 public class BandwidthResourceRequest implements ResourceRequest { 30 public class BandwidthResourceRequest implements ResourceRequest {
28 private final BandwidthResource bandwidth; 31 private final BandwidthResource bandwidth;
29 32
......
...@@ -36,7 +36,10 @@ import java.util.Set; ...@@ -36,7 +36,10 @@ import java.util.Set;
36 36
37 /** 37 /**
38 * Implementation of {@link LinkResourceAllocations}. 38 * Implementation of {@link LinkResourceAllocations}.
39 + *
40 + * @deprecated in Emu Release
39 */ 41 */
42 +@Deprecated
40 public class DefaultLinkResourceAllocations implements LinkResourceAllocations { 43 public class DefaultLinkResourceAllocations implements LinkResourceAllocations {
41 private final LinkResourceRequest request; 44 private final LinkResourceRequest request;
42 // TODO: probably should be using LinkKey instead 45 // TODO: probably should be using LinkKey instead
......
...@@ -39,7 +39,10 @@ import static com.google.common.base.Preconditions.checkNotNull; ...@@ -39,7 +39,10 @@ import static com.google.common.base.Preconditions.checkNotNull;
39 39
40 /** 40 /**
41 * Implementation of {@link LinkResourceRequest}. 41 * Implementation of {@link LinkResourceRequest}.
42 + *
43 + * @deprecated in Emu Release
42 */ 44 */
45 +@Deprecated
43 public final class DefaultLinkResourceRequest implements LinkResourceRequest { 46 public final class DefaultLinkResourceRequest implements LinkResourceRequest {
44 47
45 private final IntentId intentId; 48 private final IntentId intentId;
......
...@@ -23,7 +23,10 @@ import static com.google.common.base.Preconditions.checkNotNull; ...@@ -23,7 +23,10 @@ import static com.google.common.base.Preconditions.checkNotNull;
23 23
24 /** 24 /**
25 * Representation of lambda resource. 25 * Representation of lambda resource.
26 + *
27 + * @deprecated in Emu Release
26 */ 28 */
29 +@Deprecated
27 public final class LambdaResource implements LinkResource { 30 public final class LambdaResource implements LinkResource {
28 31
29 private final IndexedLambda lambda; 32 private final IndexedLambda lambda;
......
...@@ -23,7 +23,10 @@ import java.util.Objects; ...@@ -23,7 +23,10 @@ import java.util.Objects;
23 23
24 /** 24 /**
25 * Representation of allocated lambda resource. 25 * Representation of allocated lambda resource.
26 + *
27 + * @deprecated in Emu Release
26 */ 28 */
29 +@Deprecated
27 public class LambdaResourceAllocation implements ResourceAllocation { 30 public class LambdaResourceAllocation implements ResourceAllocation {
28 private final LambdaResource lambda; 31 private final LambdaResource lambda;
29 32
......
...@@ -24,7 +24,10 @@ import static com.google.common.base.Preconditions.checkNotNull; ...@@ -24,7 +24,10 @@ import static com.google.common.base.Preconditions.checkNotNull;
24 24
25 /** 25 /**
26 * Representation of a request for lambda resource. 26 * Representation of a request for lambda resource.
27 + *
28 + * @deprecated in Emu Release
27 */ 29 */
30 +@Deprecated
28 public class LambdaResourceRequest implements ResourceRequest { 31 public class LambdaResourceRequest implements ResourceRequest {
29 32
30 private final LambdaResource lambda; 33 private final LambdaResource lambda;
......
...@@ -17,6 +17,9 @@ package org.onosproject.net.resource.link; ...@@ -17,6 +17,9 @@ package org.onosproject.net.resource.link;
17 17
18 /** 18 /**
19 * Abstraction of link resource. 19 * Abstraction of link resource.
20 + *
21 + * @deprecated in Emu Release
20 */ 22 */
23 +@Deprecated
21 public interface LinkResource { 24 public interface LinkResource {
22 } 25 }
......
...@@ -25,7 +25,10 @@ import org.onosproject.net.resource.ResourceRequest; ...@@ -25,7 +25,10 @@ import org.onosproject.net.resource.ResourceRequest;
25 25
26 /** 26 /**
27 * Representation of allocated link resources. 27 * Representation of allocated link resources.
28 + *
29 + * @deprecated
28 */ 30 */
31 +@Deprecated
29 public interface LinkResourceAllocations extends ResourceAllocation { 32 public interface LinkResourceAllocations extends ResourceAllocation {
30 33
31 /** 34 /**
......
...@@ -23,7 +23,10 @@ import com.google.common.collect.ImmutableList; ...@@ -23,7 +23,10 @@ import com.google.common.collect.ImmutableList;
23 23
24 /** 24 /**
25 * Describes an event related to a Link Resource. 25 * Describes an event related to a Link Resource.
26 + *
27 + * @deprecated in Emu Release
26 */ 28 */
29 +@Deprecated
27 public final class LinkResourceEvent 30 public final class LinkResourceEvent
28 extends AbstractEvent<LinkResourceEvent.Type, Collection<LinkResourceAllocations>> { 31 extends AbstractEvent<LinkResourceEvent.Type, Collection<LinkResourceAllocations>> {
29 32
......
...@@ -19,6 +19,9 @@ import org.onosproject.event.EventListener; ...@@ -19,6 +19,9 @@ import org.onosproject.event.EventListener;
19 19
20 /** 20 /**
21 * Entity for receiving link resource events. 21 * Entity for receiving link resource events.
22 + *
23 + * @deprecated in Emu Release
22 */ 24 */
25 +@Deprecated
23 public interface LinkResourceListener extends EventListener<LinkResourceEvent> { 26 public interface LinkResourceListener extends EventListener<LinkResourceEvent> {
24 } 27 }
......
...@@ -27,7 +27,10 @@ import org.onosproject.net.resource.ResourceRequest; ...@@ -27,7 +27,10 @@ import org.onosproject.net.resource.ResourceRequest;
27 27
28 /** 28 /**
29 * Representation of a request for link resource. 29 * Representation of a request for link resource.
30 + *
31 + * @deprecated in Emu Release
30 */ 32 */
33 +@Deprecated
31 public interface LinkResourceRequest extends ResourceRequest { 34 public interface LinkResourceRequest extends ResourceRequest {
32 35
33 /** 36 /**
......
...@@ -23,7 +23,10 @@ import org.onosproject.net.resource.ResourceAllocation; ...@@ -23,7 +23,10 @@ import org.onosproject.net.resource.ResourceAllocation;
23 23
24 /** 24 /**
25 * Manages link resources. 25 * Manages link resources.
26 + *
27 + * @deprecated in Emu Release.
26 */ 28 */
29 +@Deprecated
27 public interface LinkResourceStore { 30 public interface LinkResourceStore {
28 /** 31 /**
29 * Returns free resources for given link. 32 * Returns free resources for given link.
......
...@@ -19,6 +19,9 @@ import org.onosproject.store.StoreDelegate; ...@@ -19,6 +19,9 @@ import org.onosproject.store.StoreDelegate;
19 19
20 /** 20 /**
21 * Link resource store delegate abstraction. 21 * Link resource store delegate abstraction.
22 + *
23 + * @deprecated in Emu Release
22 */ 24 */
25 +@Deprecated
23 public interface LinkResourceStoreDelegate extends StoreDelegate<LinkResourceEvent> { 26 public interface LinkResourceStoreDelegate extends StoreDelegate<LinkResourceEvent> {
24 } 27 }
......
...@@ -19,7 +19,10 @@ import java.util.Set; ...@@ -19,7 +19,10 @@ import java.util.Set;
19 19
20 /** 20 /**
21 * Abstraction of a resources of a link. 21 * Abstraction of a resources of a link.
22 + *
23 + * @deprecated in Emu Release
22 */ 24 */
25 +@Deprecated
23 public interface LinkResources { 26 public interface LinkResources {
24 27
25 /** 28 /**
...@@ -31,7 +34,10 @@ public interface LinkResources { ...@@ -31,7 +34,10 @@ public interface LinkResources {
31 34
32 /** 35 /**
33 * Builder of {@link LinkResources}. 36 * Builder of {@link LinkResources}.
37 + *
38 + * @deprecated in Emu Release
34 */ 39 */
40 + @Deprecated
35 interface Builder { 41 interface Builder {
36 42
37 /** 43 /**
......
...@@ -20,7 +20,10 @@ import java.util.Objects; ...@@ -20,7 +20,10 @@ import java.util.Objects;
20 20
21 /** 21 /**
22 * Representation of MPLS label resource. 22 * Representation of MPLS label resource.
23 + *
24 + * @deprecated in Emu Release
23 */ 25 */
26 +@Deprecated
24 public final class MplsLabel implements LinkResource { 27 public final class MplsLabel implements LinkResource {
25 28
26 private final org.onlab.packet.MplsLabel mplsLabel; 29 private final org.onlab.packet.MplsLabel mplsLabel;
......
...@@ -24,7 +24,10 @@ import java.util.Objects; ...@@ -24,7 +24,10 @@ import java.util.Objects;
24 24
25 /** 25 /**
26 * Representation of allocated MPLS label resource. 26 * Representation of allocated MPLS label resource.
27 + *
28 + * @deprecated in Emu Release
27 */ 29 */
30 +@Deprecated
28 public class MplsLabelResourceAllocation implements ResourceAllocation { 31 public class MplsLabelResourceAllocation implements ResourceAllocation {
29 private final MplsLabel mplsLabel; 32 private final MplsLabel mplsLabel;
30 33
......
...@@ -24,7 +24,10 @@ import static com.google.common.base.Preconditions.checkNotNull; ...@@ -24,7 +24,10 @@ import static com.google.common.base.Preconditions.checkNotNull;
24 24
25 /** 25 /**
26 * Representation of a request for lambda resource. 26 * Representation of a request for lambda resource.
27 + *
28 + * @deprecated in Emu Release
27 */ 29 */
30 +@Deprecated
28 public class MplsLabelResourceRequest implements ResourceRequest { 31 public class MplsLabelResourceRequest implements ResourceRequest {
29 32
30 private final MplsLabel mplsLabel; 33 private final MplsLabel mplsLabel;
......
...@@ -17,5 +17,11 @@ ...@@ -17,5 +17,11 @@
17 /** 17 /**
18 * Services for reserving links and their capacity as network resources, 18 * Services for reserving links and their capacity as network resources,
19 * e.g.&nbsp;bandwidth, lambdas. 19 * e.g.&nbsp;bandwidth, lambdas.
20 + * <p>
21 + * Note: Classes under the package will be remove.
22 + * Developers should not use the classes.
23 + * This package is marked as deprecated in Emu Release.
24 + * </p>
20 */ 25 */
26 +@Deprecated
21 package org.onosproject.net.resource.link; 27 package org.onosproject.net.resource.link;
......
...@@ -16,5 +16,9 @@ ...@@ -16,5 +16,9 @@
16 16
17 /** 17 /**
18 * Abstractions for reserving network resources. 18 * Abstractions for reserving network resources.
19 + * <p>
20 + * Note: Classes under the package will be removed.
21 + * Developers should not use the classes.
22 + * </p>
19 */ 23 */
20 package org.onosproject.net.resource; 24 package org.onosproject.net.resource;
......
...@@ -52,7 +52,10 @@ import static org.slf4j.LoggerFactory.getLogger; ...@@ -52,7 +52,10 @@ import static org.slf4j.LoggerFactory.getLogger;
52 52
53 /** 53 /**
54 * Manages link resources using trivial in-memory structures implementation. 54 * Manages link resources using trivial in-memory structures implementation.
55 + *
56 + * @deprecated in Emu Release
55 */ 57 */
58 +@Deprecated
56 @Component(immediate = true) 59 @Component(immediate = true)
57 @Service 60 @Service
58 public class SimpleLinkResourceStore implements LinkResourceStore { 61 public class SimpleLinkResourceStore implements LinkResourceStore {
......
...@@ -72,7 +72,10 @@ import static org.onosproject.net.AnnotationKeys.BANDWIDTH; ...@@ -72,7 +72,10 @@ import static org.onosproject.net.AnnotationKeys.BANDWIDTH;
72 72
73 /** 73 /**
74 * Store that manages link resources using Copycat-backed TransactionalMaps. 74 * Store that manages link resources using Copycat-backed TransactionalMaps.
75 + *
76 + * @deprecated in Emu Release
75 */ 77 */
78 +@Deprecated
76 @Component(immediate = true, enabled = true) 79 @Component(immediate = true, enabled = true)
77 @Service 80 @Service
78 public class ConsistentLinkResourceStore extends 81 public class ConsistentLinkResourceStore extends
......