http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/IgniteCacheNameResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/IgniteCacheNameResource.java b/modules/core/src/main/java/org/apache/ignite/resources/IgniteCacheNameResource.java deleted file mode 100644 index 0c7f356..0000000 --- a/modules/core/src/main/java/org/apache/ignite/resources/IgniteCacheNameResource.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.resources; - -import java.lang.annotation.*; - -/** - * Annotates a field or a setter method for injection of grid cache name. - * Grid cache name is provided to cache via {@link org.apache.ignite.configuration.CacheConfiguration#getName()} method. - * <p> - * Cache name can be injected into components provided in the {@link org.apache.ignite.configuration.CacheConfiguration}, - * if {@link IgniteCacheNameResource} annotation is used in another classes it is no-op. - * <p> - * Here is how injection would typically happen: - * <pre name="code" class="java"> - * public class MyCacheStore implements GridCacheStore { - * ... - * @IgniteCacheNameResource - * private String cacheName; - * ... - * } - * </pre> - * or - * <pre name="code" class="java"> - * public class MyCacheStore implements GridCacheStore { - * ... - * private String cacheName; - * ... - * @IgniteCacheNameResource - * public void setCacheName(String cacheName) { - * this.cacheName = cacheName; - * } - * ... - * } - * </pre> - * <p> - * See {@link org.apache.ignite.configuration.CacheConfiguration#getName()} for cache configuration details. - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD, ElementType.FIELD}) -public @interface IgniteCacheNameResource { - // No-op. -}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/IgniteJobContextResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/IgniteJobContextResource.java b/modules/core/src/main/java/org/apache/ignite/resources/IgniteJobContextResource.java deleted file mode 100644 index c52f80d..0000000 --- a/modules/core/src/main/java/org/apache/ignite/resources/IgniteJobContextResource.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.resources; - -import java.lang.annotation.*; - -/** - * Annotates a field or a setter method for injection of {@link org.apache.ignite.compute.ComputeJobContext} instance. - * It can be injected into grid jobs only. - * <p> - * Job context can be injected into instances of following classes: - * <ul> - * <li>{@link org.apache.ignite.compute.ComputeJob}</li> - * </ul> - * <p> - * Here is how injection would typically happen: - * <pre name="code" class="java"> - * public class MyGridJob implements ComputeJob { - * ... - * @IgniteJobContextResource - * private ComputeJobContext jobCtx; - * ... - * } - * </pre> - * or - * <pre name="code" class="java"> - * public class MyGridJob implements ComputeJob { - * ... - * private ComputeJobContext jobCtx; - * ... - * @IgniteJobContextResource - * public void setJobContext(ComputeJobContext jobCtx) { - * this.jobCtx = jobCtx; - * } - * ... - * } - * </pre> - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD, ElementType.FIELD}) -public @interface IgniteJobContextResource { - // No-op. -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/IgniteLoadBalancerResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/IgniteLoadBalancerResource.java b/modules/core/src/main/java/org/apache/ignite/resources/IgniteLoadBalancerResource.java deleted file mode 100644 index 3dbc29d..0000000 --- a/modules/core/src/main/java/org/apache/ignite/resources/IgniteLoadBalancerResource.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.resources; - -import java.lang.annotation.*; - -/** - * Annotates a field or a setter method for injection of {@link org.apache.ignite.compute.ComputeLoadBalancer}. - * Specific implementation for grid load balancer is defined by - * {@link org.apache.ignite.spi.loadbalancing.LoadBalancingSpi} - * which is provided to grid via {@link org.apache.ignite.configuration.IgniteConfiguration}.. - * <p> - * Load balancer can be injected into instances of following classes: - * <ul> - * <li>{@link org.apache.ignite.compute.ComputeTask}</li> - * </ul> - * <p> - * Here is how injection would typically happen: - * <pre name="code" class="java"> - * public class MyGridTask extends ComputeTask<String, Integer> { - * @IgniteLoadBalancerResource - * private ComputeLoadBalancer balancer; - * } - * </pre> - * or - * <pre name="code" class="java"> - * public class MyGridTask extends ComputeTask<String, Integer> { - * ... - * private ComputeLoadBalancer balancer; - * ... - * @IgniteLoadBalancerResource - * public void setBalancer(ComputeLoadBalancer balancer) { - * this.balancer = balancer; - * } - * ... - * } - * </pre> - * <p> - * See {@link org.apache.ignite.configuration.IgniteConfiguration#getLoadBalancingSpi()} for Grid configuration details. - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD, ElementType.FIELD}) -public @interface IgniteLoadBalancerResource { - // No-op. -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/IgniteLoggerResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/IgniteLoggerResource.java b/modules/core/src/main/java/org/apache/ignite/resources/IgniteLoggerResource.java deleted file mode 100644 index b396fc8..0000000 --- a/modules/core/src/main/java/org/apache/ignite/resources/IgniteLoggerResource.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.resources; - -import java.lang.annotation.*; - -/** - * Annotates a field or a setter method for injection of {@link org.apache.ignite.IgniteLogger}. Grid logger is provided to grid - * via {@link org.apache.ignite.configuration.IgniteConfiguration}. - * <p> - * Logger can be injected into instances of following classes: - * <ul> - * <li>{@link org.apache.ignite.compute.ComputeTask}</li> - * <li>{@link org.apache.ignite.compute.ComputeJob}</li> - * <li>{@link org.apache.ignite.spi.IgniteSpi}</li> - * <li>{@link org.apache.ignite.lifecycle.LifecycleBean}</li> - * </ul> - * <p> - * Here is how injection would typically happen: - * <pre name="code" class="java"> - * public class MyGridJob implements ComputeJob { - * ... - * @IgniteLoggerResource - * private GridLogger log; - * ... - * } - * </pre> - * or - * <pre name="code" class="java"> - * public class MyGridJob implements ComputeJob { - * ... - * private Ignite log; - * ... - * @IgniteLoggerResource - * public void setGridLogger(IgniteLogger log) { - * this.log = log; - * } - * ... - * } - * </pre> - * <p> - * See {@link org.apache.ignite.configuration.IgniteConfiguration#getGridLogger()} for Grid configuration details. - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD, ElementType.FIELD}) -public @interface IgniteLoggerResource { - /** - * Optional log category class. If not provided (i.e. by default - * {@link Void} class is returned), then the category will - * be the class into which resource is assigned. - * <p> - * Either {@code categoryClass} or {@link #categoryName()} can be provided, - * by not both. - * - * @return Category class of the injected logger. - */ - public Class categoryClass() default Void.class; - - /** - * Optional log category name. If not provided, then {@link #categoryClass()} - * value will be used. - * <p> - * Either {@code categoryName} or {@link #categoryClass()} can be provided, - * by not both. - * - * @return Category name for the injected logger. - */ - public String categoryName() default ""; -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/IgniteMBeanServerResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/IgniteMBeanServerResource.java b/modules/core/src/main/java/org/apache/ignite/resources/IgniteMBeanServerResource.java deleted file mode 100644 index e6c7d83..0000000 --- a/modules/core/src/main/java/org/apache/ignite/resources/IgniteMBeanServerResource.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.resources; - -import javax.management.*; -import java.lang.annotation.*; - -/** - * Annotates a field or a setter method for injection of {@link MBeanServer} resource. MBean server - * is provided to grid via {@link org.apache.ignite.configuration.IgniteConfiguration}. - * <p> - * MBean server can be injected into instances of following classes: - * <ul> - * <li>{@link org.apache.ignite.compute.ComputeTask}</li> - * <li>{@link org.apache.ignite.compute.ComputeJob}</li> - * <li>{@link org.apache.ignite.spi.IgniteSpi}</li> - * <li>{@link org.apache.ignite.lifecycle.LifecycleBean}</li> - * </ul> - * <p> - * Here is how injection would typically happen: - * <pre name="code" class="java"> - * public class MyGridJob implements ComputeJob { - * ... - * @IgniteMBeanServerResource - * private MBeanServer mbeanSrv; - * ... - * } - * </pre> - * or - * <pre name="code" class="java"> - * public class MyGridJob implements ComputeJob { - * ... - * private MBeanSever mbeanSrv; - * ... - * @IgniteMBeanServerResource - * public void setMBeanServer(MBeanServer mbeanSrv) { - * this.mbeanSrv = mbeanSrv; - * } - * ... - * } - * </pre> - * <p> - * See {@link org.apache.ignite.configuration.IgniteConfiguration#getMBeanServer()} for Grid configuration details. - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD, ElementType.FIELD}) -public @interface IgniteMBeanServerResource { - // No-op. -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/IgniteServiceResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/IgniteServiceResource.java b/modules/core/src/main/java/org/apache/ignite/resources/IgniteServiceResource.java deleted file mode 100644 index fbf719f..0000000 --- a/modules/core/src/main/java/org/apache/ignite/resources/IgniteServiceResource.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.resources; - -import java.lang.annotation.*; - -/** - * Annotates a field or a setter method for injection of GridGain service(s) by specified service name. - * If more than one service is deployed on a server, then the first available instance will be returned. - * <p> - * Here is how injection would typically happen: - * <pre name="code" class="java"> - * public class MyGridJob implements ComputeJob { - * ... - * // Inject single instance of 'myService'. If there is - * // more than one, first deployed instance will be picked. - * @IgniteServiceResource(serviceName = "myService", proxyInterface = MyService.class) - * private MyService svc; - * ... - * } - * </pre> - * or attach the same annotations to methods: - * <pre name="code" class="java"> - * public class MyGridJob implements ComputeJob { - * ... - * private MyService svc; - * ... - * // Inject all locally deployed instances of 'myService'. - * @IgniteServiceResource(serviceName = "myService") - * public void setMyService(MyService svc) { - * this.svc = svc; - * } - * ... - * } - * </pre> - * <p> - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD, ElementType.FIELD}) -public @interface IgniteServiceResource { - /** - * Service name. - * - * @return Name of the injected services. - */ - public String serviceName(); - - /** - * In case if an instance of the service is not available locally, - * an instance of the service proxy for a remote service instance - * may be returned. If you wish to return only locally deployed - * instance, then leave this property as {@code null}. - * <p> - * For more information about service proxies, see - * {@link org.apache.ignite.IgniteServices#serviceProxy(String, Class, boolean)} documentation. - * - * @return Interface class for remote service proxy. - */ - public Class<?> proxyInterface() default Void.class; - - /** - * Flag indicating if a sticky instance of a service proxy should be returned. - * This flag is only valid if {@link #proxyInterface()} is not {@code null}. - * <p> - * For information about sticky flag, see {@link org.apache.ignite.IgniteServices#serviceProxy(String, Class, boolean)} - * documentation. - * - * @return {@code True} if a sticky instance of a service proxy should be injected. - */ - public boolean proxySticky() default false; -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/IgniteSpringApplicationContextResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/IgniteSpringApplicationContextResource.java b/modules/core/src/main/java/org/apache/ignite/resources/IgniteSpringApplicationContextResource.java deleted file mode 100644 index 2ec27b1..0000000 --- a/modules/core/src/main/java/org/apache/ignite/resources/IgniteSpringApplicationContextResource.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.resources; - -import java.lang.annotation.*; - -/** - * Annotates a field or a setter method for injection of Spring ApplicationContext resource. - * When GridGain starts using Spring configuration, the Application Context for Spring - * Configuration is injected as this resource. - * method. - * <p> - * Spring Application Context can be injected into instances of following classes: - * <ul> - * <li>{@link org.apache.ignite.compute.ComputeTask}</li> - * <li>{@link org.apache.ignite.compute.ComputeJob}</li> - * <li>{@link org.apache.ignite.spi.IgniteSpi}</li> - * <li>{@link org.apache.ignite.lifecycle.LifecycleBean}</li> - * </ul> - * <p> - * Here is how injection would typically happen: - * <pre name="code" class="java"> - * public class MyGridJob implements ComputeJob { - * ... - * @IgniteSpringApplicationContextResource - * private ApplicationContext springCtx; - * ... - * } - * </pre> - * or - * <pre name="code" class="java"> - * public class MyGridJob implements ComputeJob { - * ... - * private ApplicationContext springCtx; - * ... - * @IgniteSpringApplicationContextResource - * public void setApplicationContext(MBeanServer springCtx) { - * this.springCtx = springCtx; - * } - * ... - * } - * </pre> - * <p> - * <img src="http://www.gridgain.com/images/spring-small.png"> - * <br> - * For information about Spring framework visit <a href="http://www.springframework.org/">www.springframework.org</a> - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD, ElementType.FIELD}) -public @interface IgniteSpringApplicationContextResource { - // No-op. -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/IgniteSpringResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/IgniteSpringResource.java b/modules/core/src/main/java/org/apache/ignite/resources/IgniteSpringResource.java deleted file mode 100644 index 3b98703..0000000 --- a/modules/core/src/main/java/org/apache/ignite/resources/IgniteSpringResource.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.resources; - -import java.io.*; -import java.lang.annotation.*; - -/** - * Annotates a field or a setter method for injection of resource - * from Spring {@code ApplicationContext}. Use it whenever you would - * like to inject resources specified in Spring application context of XML - * configuration. - * <p> - * Logger can be injected into instances of following classes: - * <ul> - * <li>{@link org.apache.ignite.compute.ComputeTask}</li> - * <li>{@link org.apache.ignite.compute.ComputeJob}</li> - * <li>{@link org.apache.ignite.spi.IgniteSpi}</li> - * <li>{@link org.apache.ignite.lifecycle.LifecycleBean}</li> - * </ul> - * <p> - * <h1 class="header">Resource Name</h1> - * This is a mandatory parameter. Resource name will be used to access - * Spring resources from Spring {@code ApplicationContext} or XML configuration. - * <p> - * Note that Spring resources cannot be peer-class-loaded. They must be available in - * every {@code ApplicationContext} or Spring XML configuration on every grid node. - * For this reason, if injected into a {@link Serializable} class, they must - * be declared as {@code transient}. - * <p> - * The lifecycle of Spring resources is controlled by Spring container. - * <p> - * <h1 class="header">Examples</h1> - * Here is how injection would typically happen: - * <pre name="code" class="java"> - * public class MyGridJob implements ComputeJob { - * ... - * @IgniteSpringResource(resourceName = "bean-name") - * private transient MyUserBean rsrc; - * ... - * } - * </pre> - * or - * <pre name="code" class="java"> - * public class MyGridJob implements ComputeJob { - * ... - * private transient MyUserBean rsrc; - * ... - * @IgniteSpringResource(resourceName = "bean-name") - * public void setMyUserBean(MyUserBean rsrc) { - * this.rsrc = rsrc; - * } - * ... - * } - * </pre> - * and user resource {@code MyUserResource} - * <pre name="code" class="java"> - * public class MyUserResource { - * ... - * @IgniteSpringResource(resourceName = "bean-name") - * private MyUserBean rsrc; - * ... - * // Inject logger (or any other resource). - * @IgniteLoggerResource - * private GridLogger log; - * - * // Inject ignite instance (or any other resource). - * @IgniteInstanceResource - * private Ignite ignite; - * ... - * } - * </pre> - * where spring bean resource class can look like this: - * <pre name="code" class="java"> - * public class MyUserBean { - * ... - * } - * </pre> - * and Spring file - * <pre name="code" class="xml"> - * <bean id="bean-name" class="my.foo.MyUserBean" singleton="true"> - * ... - * </bean> - * </pre> - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD, ElementType.FIELD}) -public @interface IgniteSpringResource { - /** - * Resource bean name in provided {@code ApplicationContext} to look up - * a Spring bean. - * - * @return Resource bean name. - */ - String resourceName(); -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/IgniteTaskContinuousMapperResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/IgniteTaskContinuousMapperResource.java b/modules/core/src/main/java/org/apache/ignite/resources/IgniteTaskContinuousMapperResource.java deleted file mode 100644 index fe1b857..0000000 --- a/modules/core/src/main/java/org/apache/ignite/resources/IgniteTaskContinuousMapperResource.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.resources; - -import java.lang.annotation.*; - -/** - * Annotates a field or a setter method for injection of - * {@link org.apache.ignite.compute.ComputeTaskContinuousMapper} resource. - * <p> - * Task continuous mapper can be injected into {@link org.apache.ignite.compute.ComputeTask} class - * instance. - * <p> - * Here is how injection would typically happen: - * <pre name="code" class="java"> - * public class MyGridJob implements ComputeJob { - * ... - * @IgniteTaskContinuousMapperResource - * private ComputeTaskContinuousMapper mapper; - * ... - * } - * </pre> - * or - * <pre name="code" class="java"> - * public class MyGridJob implements ComputeJob { - * ... - * private ComputeTaskContinuousMapper mapper; - * ... - * @IgniteTaskContinuousMapperResource - * public void setMapper(ComputeTaskContinuousMapper mapper) { - * this.mapper = mapper; - * } - * ... - * } - * </pre> - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD, ElementType.FIELD}) -public @interface IgniteTaskContinuousMapperResource { - // No-op. -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/IgniteTaskSessionResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/IgniteTaskSessionResource.java b/modules/core/src/main/java/org/apache/ignite/resources/IgniteTaskSessionResource.java deleted file mode 100644 index 508af5d..0000000 --- a/modules/core/src/main/java/org/apache/ignite/resources/IgniteTaskSessionResource.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.ignite.resources; - -import java.lang.annotation.*; - -/** - * Annotates a field or a setter method for injection of {@link org.apache.ignite.compute.ComputeTaskSession} resource. - * Task session can be injected into instances of following classes: - * <p> - * Distributed Task Session can be injected into instances of following classes: - * <ul> - * <li>{@link org.apache.ignite.compute.ComputeTask}</li> - * <li>{@link org.apache.ignite.compute.ComputeJob}</li> - * </ul> - * <p> - * Here is how injection would typically happen: - * <pre name="code" class="java"> - * public class MyGridJob implements ComputeJob { - * ... - * @IgniteTaskSessionResource - * private ComputeTaskSession taskSes; - * ... - * } - * </pre> - * or - * <pre name="code" class="java"> - * public class MyGridJob implements ComputeJob { - * ... - * private ComputeTaskSession taskSes; - * ... - * @IgniteTaskSessionResource - * public void setTaskSession(ComputeTaskSession taskSes) { - * this.taskSes = taskSes; - * } - * ... - * } - * </pre> - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD, ElementType.FIELD}) -public @interface IgniteTaskSessionResource { - // No-op. -} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/JobContextResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/JobContextResource.java b/modules/core/src/main/java/org/apache/ignite/resources/JobContextResource.java new file mode 100644 index 0000000..681c88c --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/resources/JobContextResource.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.resources; + +import java.lang.annotation.*; + +/** + * Annotates a field or a setter method for injection of {@link org.apache.ignite.compute.ComputeJobContext} instance. + * It can be injected into grid jobs only. + * <p> + * Job context can be injected into instances of following classes: + * <ul> + * <li>{@link org.apache.ignite.compute.ComputeJob}</li> + * </ul> + * <p> + * Here is how injection would typically happen: + * <pre name="code" class="java"> + * public class MyGridJob implements ComputeJob { + * ... + * @IgniteJobContextResource + * private ComputeJobContext jobCtx; + * ... + * } + * </pre> + * or + * <pre name="code" class="java"> + * public class MyGridJob implements ComputeJob { + * ... + * private ComputeJobContext jobCtx; + * ... + * @IgniteJobContextResource + * public void setJobContext(ComputeJobContext jobCtx) { + * this.jobCtx = jobCtx; + * } + * ... + * } + * </pre> + */ +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD, ElementType.FIELD}) +public @interface JobContextResource { + // No-op. +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/LoadBalancerResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/LoadBalancerResource.java b/modules/core/src/main/java/org/apache/ignite/resources/LoadBalancerResource.java new file mode 100644 index 0000000..84f294c --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/resources/LoadBalancerResource.java @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.resources; + +import java.lang.annotation.*; + +/** + * Annotates a field or a setter method for injection of {@link org.apache.ignite.compute.ComputeLoadBalancer}. + * Specific implementation for grid load balancer is defined by + * {@link org.apache.ignite.spi.loadbalancing.LoadBalancingSpi} + * which is provided to grid via {@link org.apache.ignite.configuration.IgniteConfiguration}.. + * <p> + * Load balancer can be injected into instances of following classes: + * <ul> + * <li>{@link org.apache.ignite.compute.ComputeTask}</li> + * </ul> + * <p> + * Here is how injection would typically happen: + * <pre name="code" class="java"> + * public class MyGridTask extends ComputeTask<String, Integer> { + * @IgniteLoadBalancerResource + * private ComputeLoadBalancer balancer; + * } + * </pre> + * or + * <pre name="code" class="java"> + * public class MyGridTask extends ComputeTask<String, Integer> { + * ... + * private ComputeLoadBalancer balancer; + * ... + * @IgniteLoadBalancerResource + * public void setBalancer(ComputeLoadBalancer balancer) { + * this.balancer = balancer; + * } + * ... + * } + * </pre> + * <p> + * See {@link org.apache.ignite.configuration.IgniteConfiguration#getLoadBalancingSpi()} for Grid configuration details. + */ +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD, ElementType.FIELD}) +public @interface LoadBalancerResource { + // No-op. +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/LoggerResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/LoggerResource.java b/modules/core/src/main/java/org/apache/ignite/resources/LoggerResource.java new file mode 100644 index 0000000..0bc938f --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/resources/LoggerResource.java @@ -0,0 +1,85 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.resources; + +import java.lang.annotation.*; + +/** + * Annotates a field or a setter method for injection of {@link org.apache.ignite.IgniteLogger}. Grid logger is provided to grid + * via {@link org.apache.ignite.configuration.IgniteConfiguration}. + * <p> + * Logger can be injected into instances of following classes: + * <ul> + * <li>{@link org.apache.ignite.compute.ComputeTask}</li> + * <li>{@link org.apache.ignite.compute.ComputeJob}</li> + * <li>{@link org.apache.ignite.spi.IgniteSpi}</li> + * <li>{@link org.apache.ignite.lifecycle.LifecycleBean}</li> + * </ul> + * <p> + * Here is how injection would typically happen: + * <pre name="code" class="java"> + * public class MyGridJob implements ComputeJob { + * ... + * @IgniteLoggerResource + * private GridLogger log; + * ... + * } + * </pre> + * or + * <pre name="code" class="java"> + * public class MyGridJob implements ComputeJob { + * ... + * private Ignite log; + * ... + * @IgniteLoggerResource + * public void setGridLogger(IgniteLogger log) { + * this.log = log; + * } + * ... + * } + * </pre> + * <p> + * See {@link org.apache.ignite.configuration.IgniteConfiguration#getGridLogger()} for Grid configuration details. + */ +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD, ElementType.FIELD}) +public @interface LoggerResource { + /** + * Optional log category class. If not provided (i.e. by default + * {@link Void} class is returned), then the category will + * be the class into which resource is assigned. + * <p> + * Either {@code categoryClass} or {@link #categoryName()} can be provided, + * by not both. + * + * @return Category class of the injected logger. + */ + public Class categoryClass() default Void.class; + + /** + * Optional log category name. If not provided, then {@link #categoryClass()} + * value will be used. + * <p> + * Either {@code categoryName} or {@link #categoryClass()} can be provided, + * by not both. + * + * @return Category name for the injected logger. + */ + public String categoryName() default ""; +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/MBeanServerResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/MBeanServerResource.java b/modules/core/src/main/java/org/apache/ignite/resources/MBeanServerResource.java new file mode 100644 index 0000000..bf11e91 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/resources/MBeanServerResource.java @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.resources; + +import javax.management.*; +import java.lang.annotation.*; + +/** + * Annotates a field or a setter method for injection of {@link MBeanServer} resource. MBean server + * is provided to grid via {@link org.apache.ignite.configuration.IgniteConfiguration}. + * <p> + * MBean server can be injected into instances of following classes: + * <ul> + * <li>{@link org.apache.ignite.compute.ComputeTask}</li> + * <li>{@link org.apache.ignite.compute.ComputeJob}</li> + * <li>{@link org.apache.ignite.spi.IgniteSpi}</li> + * <li>{@link org.apache.ignite.lifecycle.LifecycleBean}</li> + * </ul> + * <p> + * Here is how injection would typically happen: + * <pre name="code" class="java"> + * public class MyGridJob implements ComputeJob { + * ... + * @IgniteMBeanServerResource + * private MBeanServer mbeanSrv; + * ... + * } + * </pre> + * or + * <pre name="code" class="java"> + * public class MyGridJob implements ComputeJob { + * ... + * private MBeanSever mbeanSrv; + * ... + * @IgniteMBeanServerResource + * public void setMBeanServer(MBeanServer mbeanSrv) { + * this.mbeanSrv = mbeanSrv; + * } + * ... + * } + * </pre> + * <p> + * See {@link org.apache.ignite.configuration.IgniteConfiguration#getMBeanServer()} for Grid configuration details. + */ +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD, ElementType.FIELD}) +public @interface MBeanServerResource { + // No-op. +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/ServiceResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/ServiceResource.java b/modules/core/src/main/java/org/apache/ignite/resources/ServiceResource.java new file mode 100644 index 0000000..a32bcc8 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/resources/ServiceResource.java @@ -0,0 +1,87 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.resources; + +import java.lang.annotation.*; + +/** + * Annotates a field or a setter method for injection of GridGain service(s) by specified service name. + * If more than one service is deployed on a server, then the first available instance will be returned. + * <p> + * Here is how injection would typically happen: + * <pre name="code" class="java"> + * public class MyGridJob implements ComputeJob { + * ... + * // Inject single instance of 'myService'. If there is + * // more than one, first deployed instance will be picked. + * @IgniteServiceResource(serviceName = "myService", proxyInterface = MyService.class) + * private MyService svc; + * ... + * } + * </pre> + * or attach the same annotations to methods: + * <pre name="code" class="java"> + * public class MyGridJob implements ComputeJob { + * ... + * private MyService svc; + * ... + * // Inject all locally deployed instances of 'myService'. + * @IgniteServiceResource(serviceName = "myService") + * public void setMyService(MyService svc) { + * this.svc = svc; + * } + * ... + * } + * </pre> + * <p> + */ +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD, ElementType.FIELD}) +public @interface ServiceResource { + /** + * Service name. + * + * @return Name of the injected services. + */ + public String serviceName(); + + /** + * In case if an instance of the service is not available locally, + * an instance of the service proxy for a remote service instance + * may be returned. If you wish to return only locally deployed + * instance, then leave this property as {@code null}. + * <p> + * For more information about service proxies, see + * {@link org.apache.ignite.IgniteServices#serviceProxy(String, Class, boolean)} documentation. + * + * @return Interface class for remote service proxy. + */ + public Class<?> proxyInterface() default Void.class; + + /** + * Flag indicating if a sticky instance of a service proxy should be returned. + * This flag is only valid if {@link #proxyInterface()} is not {@code null}. + * <p> + * For information about sticky flag, see {@link org.apache.ignite.IgniteServices#serviceProxy(String, Class, boolean)} + * documentation. + * + * @return {@code True} if a sticky instance of a service proxy should be injected. + */ + public boolean proxySticky() default false; +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/SpringApplicationContextResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/SpringApplicationContextResource.java b/modules/core/src/main/java/org/apache/ignite/resources/SpringApplicationContextResource.java new file mode 100644 index 0000000..eee2266 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/resources/SpringApplicationContextResource.java @@ -0,0 +1,68 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.resources; + +import java.lang.annotation.*; + +/** + * Annotates a field or a setter method for injection of Spring ApplicationContext resource. + * When GridGain starts using Spring configuration, the Application Context for Spring + * Configuration is injected as this resource. + * method. + * <p> + * Spring Application Context can be injected into instances of following classes: + * <ul> + * <li>{@link org.apache.ignite.compute.ComputeTask}</li> + * <li>{@link org.apache.ignite.compute.ComputeJob}</li> + * <li>{@link org.apache.ignite.spi.IgniteSpi}</li> + * <li>{@link org.apache.ignite.lifecycle.LifecycleBean}</li> + * </ul> + * <p> + * Here is how injection would typically happen: + * <pre name="code" class="java"> + * public class MyGridJob implements ComputeJob { + * ... + * @IgniteSpringApplicationContextResource + * private ApplicationContext springCtx; + * ... + * } + * </pre> + * or + * <pre name="code" class="java"> + * public class MyGridJob implements ComputeJob { + * ... + * private ApplicationContext springCtx; + * ... + * @IgniteSpringApplicationContextResource + * public void setApplicationContext(MBeanServer springCtx) { + * this.springCtx = springCtx; + * } + * ... + * } + * </pre> + * <p> + * <img src="http://www.gridgain.com/images/spring-small.png"> + * <br> + * For information about Spring framework visit <a href="http://www.springframework.org/">www.springframework.org</a> + */ +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD, ElementType.FIELD}) +public @interface SpringApplicationContextResource { + // No-op. +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/SpringResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/SpringResource.java b/modules/core/src/main/java/org/apache/ignite/resources/SpringResource.java new file mode 100644 index 0000000..cfaa1e0 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/resources/SpringResource.java @@ -0,0 +1,112 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.resources; + +import java.io.*; +import java.lang.annotation.*; + +/** + * Annotates a field or a setter method for injection of resource + * from Spring {@code ApplicationContext}. Use it whenever you would + * like to inject resources specified in Spring application context of XML + * configuration. + * <p> + * Logger can be injected into instances of following classes: + * <ul> + * <li>{@link org.apache.ignite.compute.ComputeTask}</li> + * <li>{@link org.apache.ignite.compute.ComputeJob}</li> + * <li>{@link org.apache.ignite.spi.IgniteSpi}</li> + * <li>{@link org.apache.ignite.lifecycle.LifecycleBean}</li> + * </ul> + * <p> + * <h1 class="header">Resource Name</h1> + * This is a mandatory parameter. Resource name will be used to access + * Spring resources from Spring {@code ApplicationContext} or XML configuration. + * <p> + * Note that Spring resources cannot be peer-class-loaded. They must be available in + * every {@code ApplicationContext} or Spring XML configuration on every grid node. + * For this reason, if injected into a {@link Serializable} class, they must + * be declared as {@code transient}. + * <p> + * The lifecycle of Spring resources is controlled by Spring container. + * <p> + * <h1 class="header">Examples</h1> + * Here is how injection would typically happen: + * <pre name="code" class="java"> + * public class MyGridJob implements ComputeJob { + * ... + * @IgniteSpringResource(resourceName = "bean-name") + * private transient MyUserBean rsrc; + * ... + * } + * </pre> + * or + * <pre name="code" class="java"> + * public class MyGridJob implements ComputeJob { + * ... + * private transient MyUserBean rsrc; + * ... + * @IgniteSpringResource(resourceName = "bean-name") + * public void setMyUserBean(MyUserBean rsrc) { + * this.rsrc = rsrc; + * } + * ... + * } + * </pre> + * and user resource {@code MyUserResource} + * <pre name="code" class="java"> + * public class MyUserResource { + * ... + * @IgniteSpringResource(resourceName = "bean-name") + * private MyUserBean rsrc; + * ... + * // Inject logger (or any other resource). + * @IgniteLoggerResource + * private GridLogger log; + * + * // Inject ignite instance (or any other resource). + * @IgniteInstanceResource + * private Ignite ignite; + * ... + * } + * </pre> + * where spring bean resource class can look like this: + * <pre name="code" class="java"> + * public class MyUserBean { + * ... + * } + * </pre> + * and Spring file + * <pre name="code" class="xml"> + * <bean id="bean-name" class="my.foo.MyUserBean" singleton="true"> + * ... + * </bean> + * </pre> + */ +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD, ElementType.FIELD}) +public @interface SpringResource { + /** + * Resource bean name in provided {@code ApplicationContext} to look up + * a Spring bean. + * + * @return Resource bean name. + */ + String resourceName(); +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/TaskContinuousMapperResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/TaskContinuousMapperResource.java b/modules/core/src/main/java/org/apache/ignite/resources/TaskContinuousMapperResource.java new file mode 100644 index 0000000..b26e0ee --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/resources/TaskContinuousMapperResource.java @@ -0,0 +1,57 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.resources; + +import java.lang.annotation.*; + +/** + * Annotates a field or a setter method for injection of + * {@link org.apache.ignite.compute.ComputeTaskContinuousMapper} resource. + * <p> + * Task continuous mapper can be injected into {@link org.apache.ignite.compute.ComputeTask} class + * instance. + * <p> + * Here is how injection would typically happen: + * <pre name="code" class="java"> + * public class MyGridJob implements ComputeJob { + * ... + * @IgniteTaskContinuousMapperResource + * private ComputeTaskContinuousMapper mapper; + * ... + * } + * </pre> + * or + * <pre name="code" class="java"> + * public class MyGridJob implements ComputeJob { + * ... + * private ComputeTaskContinuousMapper mapper; + * ... + * @IgniteTaskContinuousMapperResource + * public void setMapper(ComputeTaskContinuousMapper mapper) { + * this.mapper = mapper; + * } + * ... + * } + * </pre> + */ +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD, ElementType.FIELD}) +public @interface TaskContinuousMapperResource { + // No-op. +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/resources/TaskSessionResource.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/resources/TaskSessionResource.java b/modules/core/src/main/java/org/apache/ignite/resources/TaskSessionResource.java new file mode 100644 index 0000000..11d85ea --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/resources/TaskSessionResource.java @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.resources; + +import java.lang.annotation.*; + +/** + * Annotates a field or a setter method for injection of {@link org.apache.ignite.compute.ComputeTaskSession} resource. + * Task session can be injected into instances of following classes: + * <p> + * Distributed Task Session can be injected into instances of following classes: + * <ul> + * <li>{@link org.apache.ignite.compute.ComputeTask}</li> + * <li>{@link org.apache.ignite.compute.ComputeJob}</li> + * </ul> + * <p> + * Here is how injection would typically happen: + * <pre name="code" class="java"> + * public class MyGridJob implements ComputeJob { + * ... + * @IgniteTaskSessionResource + * private ComputeTaskSession taskSes; + * ... + * } + * </pre> + * or + * <pre name="code" class="java"> + * public class MyGridJob implements ComputeJob { + * ... + * private ComputeTaskSession taskSes; + * ... + * @IgniteTaskSessionResource + * public void setTaskSession(ComputeTaskSession taskSes) { + * this.taskSes = taskSes; + * } + * ... + * } + * </pre> + */ +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD, ElementType.FIELD}) +public @interface TaskSessionResource { + // No-op. +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpi.java index f986a68..968d88d 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpi.java @@ -29,9 +29,9 @@ import java.util.*; * with ignite resources. Both, field and method based injection are supported. * The following ignite resources can be injected: * <ul> - * <li>{@link org.apache.ignite.resources.IgniteLoggerResource}</li> - * <li>{@link org.apache.ignite.resources.IgniteSpringApplicationContextResource}</li> - * <li>{@link org.apache.ignite.resources.IgniteSpringResource}</li> + * <li>{@link org.apache.ignite.resources.LoggerResource}</li> + * <li>{@link org.apache.ignite.resources.SpringApplicationContextResource}</li> + * <li>{@link org.apache.ignite.resources.SpringResource}</li> * </ul> * Refer to corresponding resource documentation for more information. */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java index a751d68..edffeca 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java @@ -53,7 +53,7 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement private long startTstamp; /** */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** Ignite instance */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/authentication/noop/NoopAuthenticationSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/authentication/noop/NoopAuthenticationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/authentication/noop/NoopAuthenticationSpi.java index 4e4c129..3c0ef22 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/authentication/noop/NoopAuthenticationSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/authentication/noop/NoopAuthenticationSpi.java @@ -68,7 +68,7 @@ import org.apache.ignite.spi.authentication.*; public class NoopAuthenticationSpi extends IgniteSpiAdapter implements AuthenticationSpi, NoopAuthenticationSpiMBean { /** Injected grid logger. */ - @IgniteLoggerResource + @LoggerResource @GridToStringExclude private IgniteLogger log; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpi.java index e66d264..34e4b21 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/cache/CacheCheckpointSpi.java @@ -99,7 +99,7 @@ public class CacheCheckpointSpi extends IgniteSpiAdapter implements CheckpointSp public static final String DFLT_CACHE_NAME = "checkpoints"; /** Logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** Cache name. */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpi.java index f53e926..72309d9 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/jdbc/JdbcCheckpointSpi.java @@ -168,7 +168,7 @@ public class JdbcCheckpointSpi extends IgniteSpiAdapter implements CheckpointSpi private static final String DELETE_EXPIRED_SQL = "DELETE FROM {0} WHERE {1} IS NOT NULL AND {1} <= ?"; /** */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/noop/NoopCheckpointSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/noop/NoopCheckpointSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/noop/NoopCheckpointSpi.java index 7349568..460cff3 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/noop/NoopCheckpointSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/noop/NoopCheckpointSpi.java @@ -32,7 +32,7 @@ import org.jetbrains.annotations.*; @IgniteSpiMultipleInstancesSupport(true) public class NoopCheckpointSpi extends IgniteSpiAdapter implements CheckpointSpi { /** Logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpi.java index a802653..9540b7c 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/checkpoint/sharedfs/SharedFsCheckpointSpi.java @@ -118,7 +118,7 @@ public class SharedFsCheckpointSpi extends IgniteSpiAdapter implements Checkpoin private static final int CODES_LEN = CODES.length(); /** Grid logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** Ignite instance. */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/collision/fifoqueue/FifoQueueCollisionSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/collision/fifoqueue/FifoQueueCollisionSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/collision/fifoqueue/FifoQueueCollisionSpi.java index dfc6fcf..e85c92b 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/collision/fifoqueue/FifoQueueCollisionSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/collision/fifoqueue/FifoQueueCollisionSpi.java @@ -93,7 +93,7 @@ public class FifoQueueCollisionSpi extends IgniteSpiAdapter implements Collision private volatile int waitJobsNum = DFLT_WAIT_JOBS_NUM; /** Grid logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** Number of jobs that were active last time. */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingCollisionSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingCollisionSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingCollisionSpi.java index f185198..98bb4ac 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingCollisionSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/collision/jobstealing/JobStealingCollisionSpi.java @@ -224,7 +224,7 @@ public class JobStealingCollisionSpi extends IgniteSpiAdapter implements Collisi /** Grid logger. */ @SuppressWarnings({"FieldAccessedSynchronizedAndUnsynchronized"}) - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** Number of jobs that can be executed in parallel. */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/collision/priorityqueue/PriorityQueueCollisionSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/collision/priorityqueue/PriorityQueueCollisionSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/collision/priorityqueue/PriorityQueueCollisionSpi.java index a55e7258..f297b7c 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/collision/priorityqueue/PriorityQueueCollisionSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/collision/priorityqueue/PriorityQueueCollisionSpi.java @@ -229,7 +229,7 @@ public class PriorityQueueCollisionSpi extends IgniteSpiAdapter implements Colli private Comparator<GridCollisionJobContextWrapper> priComp; /** */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java index 076013d..9da993a 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java @@ -623,7 +623,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter }; /** Logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** Local IP address. */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java index 43ec358..3809517 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/deployment/local/LocalDeploymentSpi.java @@ -57,7 +57,7 @@ import java.util.concurrent.*; public class LocalDeploymentSpi extends IgniteSpiAdapter implements DeploymentSpi, LocalDeploymentSpiMBean { /** */ @SuppressWarnings({"FieldAccessedSynchronizedAndUnsynchronized"}) - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** Map of all resources. */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java index 2085d1b..52724ed 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java @@ -141,7 +141,7 @@ abstract class TcpDiscoverySpiAdapter extends IgniteSpiAdapter implements Discov protected final TcpDiscoveryStatistics stats = new TcpDiscoveryStatistics(); /** Logger. */ - @IgniteLoggerResource + @LoggerResource protected IgniteLogger log; /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java index 6725abd..c7ab766 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/jdbc/TcpDiscoveryJdbcIpFinder.java @@ -71,7 +71,7 @@ public class TcpDiscoveryJdbcIpFinder extends TcpDiscoveryIpFinderAdapter { public static final String CHK_QRY = "select count(*) from tbl_addrs"; /** Grid logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** Data source. */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java index 9b9b3dd..3ff4157 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/multicast/TcpDiscoveryMulticastIpFinder.java @@ -80,7 +80,7 @@ public class TcpDiscoveryMulticastIpFinder extends TcpDiscoveryVmIpFinder { private static final Marshaller marsh = new JdkMarshaller(); /** Grid logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** Ignite instance . */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/sharedfs/TcpDiscoverySharedFsIpFinder.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/sharedfs/TcpDiscoverySharedFsIpFinder.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/sharedfs/TcpDiscoverySharedFsIpFinder.java index 53ac5f4..3a8e6dc 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/sharedfs/TcpDiscoverySharedFsIpFinder.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/sharedfs/TcpDiscoverySharedFsIpFinder.java @@ -65,7 +65,7 @@ public class TcpDiscoverySharedFsIpFinder extends TcpDiscoveryIpFinderAdapter { public static final String DELIM = "#"; /** Grid logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** File-system path. */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/vm/TcpDiscoveryVmIpFinder.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/vm/TcpDiscoveryVmIpFinder.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/vm/TcpDiscoveryVmIpFinder.java index 110e39c..2babf83 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/vm/TcpDiscoveryVmIpFinder.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/vm/TcpDiscoveryVmIpFinder.java @@ -46,7 +46,7 @@ import static org.apache.ignite.IgniteSystemProperties.*; */ public class TcpDiscoveryVmIpFinder extends TcpDiscoveryIpFinderAdapter { /** Grid logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** Addresses. */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/memory/MemoryEventStorageSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/memory/MemoryEventStorageSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/memory/MemoryEventStorageSpi.java index 3b7d84d..073fa42 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/memory/MemoryEventStorageSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/eventstorage/memory/MemoryEventStorageSpi.java @@ -99,7 +99,7 @@ public class MemoryEventStorageSpi extends IgniteSpiAdapter implements EventStor public static final int DFLT_EXPIRE_COUNT = 10000; /** */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** Event time-to-live value in milliseconds. */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpi.java index 26ea7e0..3db3efd 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpi.java @@ -96,7 +96,7 @@ public class AlwaysFailoverSpi extends IgniteSpiAdapter implements FailoverSpi, public static final String MAX_FAILOVER_ATTEMPT_ATTR = "gg:failover:maxattempts"; /** Injected grid logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** Maximum number of attempts to execute a failed job on another node. */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/failover/jobstealing/JobStealingFailoverSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/failover/jobstealing/JobStealingFailoverSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/failover/jobstealing/JobStealingFailoverSpi.java index 32e47a2..bd3fe22 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/failover/jobstealing/JobStealingFailoverSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/failover/jobstealing/JobStealingFailoverSpi.java @@ -113,7 +113,7 @@ public class JobStealingFailoverSpi extends IgniteSpiAdapter implements Failover private static final String MAX_FAILOVER_ATTEMPT_ATTR = "gg:failover:maxattempts"; /** Injected grid logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** Maximum number of attempts to execute a failed job on another node. */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/failover/never/NeverFailoverSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/failover/never/NeverFailoverSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/failover/never/NeverFailoverSpi.java index 8a12443..7f81ed8 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/failover/never/NeverFailoverSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/failover/never/NeverFailoverSpi.java @@ -63,7 +63,7 @@ import java.util.*; @IgniteSpiMultipleInstancesSupport(true) public class NeverFailoverSpi extends IgniteSpiAdapter implements FailoverSpi, NeverFailoverSpiMBean { /** Injected grid logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpi.java index e8b115d..c43c251 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/adaptive/AdaptiveLoadBalancingSpi.java @@ -235,7 +235,7 @@ public class AdaptiveLoadBalancingSpi extends IgniteSpiAdapter implements LoadBa private static final Random RAND = new Random(); /** Grid logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinLoadBalancingSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinLoadBalancingSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinLoadBalancingSpi.java index ef409be..81558a0 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinLoadBalancingSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/roundrobin/RoundRobinLoadBalancingSpi.java @@ -163,7 +163,7 @@ import static org.apache.ignite.events.EventType.*; public class RoundRobinLoadBalancingSpi extends IgniteSpiAdapter implements LoadBalancingSpi, RoundRobinLoadBalancingSpiMBean { /** Grid logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.java index b45ddd4..efdfd20 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.java @@ -176,7 +176,7 @@ public class WeightedRandomLoadBalancingSpi extends IgniteSpiAdapter implements public static final int DFLT_NODE_WEIGHT = 10; /** Grid logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/securesession/noop/NoopSecureSessionSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/securesession/noop/NoopSecureSessionSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/securesession/noop/NoopSecureSessionSpi.java index 9379dab..59bf2d4 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/securesession/noop/NoopSecureSessionSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/securesession/noop/NoopSecureSessionSpi.java @@ -73,7 +73,7 @@ public class NoopSecureSessionSpi extends IgniteSpiAdapter private static final byte[] EMPTY_BYTE_ARRAY = new byte[0]; /** Injected grid logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java index fc4af55..426c0c4 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java @@ -148,7 +148,7 @@ public class FileSwapSpaceSpi extends IgniteSpiAdapter implements SwapSpaceSpi, private int readStripesNum = -1; /** Logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/main/java/org/apache/ignite/spi/swapspace/noop/NoopSwapSpaceSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/swapspace/noop/NoopSwapSpaceSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/swapspace/noop/NoopSwapSpaceSpi.java index 008e2c1..1de07c9 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/swapspace/noop/NoopSwapSpaceSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/swapspace/noop/NoopSwapSpaceSpi.java @@ -35,7 +35,7 @@ import java.util.*; @IgniteSpiMultipleInstancesSupport(true) public class NoopSwapSpaceSpi extends IgniteSpiAdapter implements SwapSpaceSpi { /** Logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/test/java/org/apache/ignite/GridTestJob.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/GridTestJob.java b/modules/core/src/test/java/org/apache/ignite/GridTestJob.java index 93dbece..018d2c5 100644 --- a/modules/core/src/test/java/org/apache/ignite/GridTestJob.java +++ b/modules/core/src/test/java/org/apache/ignite/GridTestJob.java @@ -25,7 +25,7 @@ import org.apache.ignite.resources.*; */ public class GridTestJob extends ComputeJobAdapter { /** Logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/test/java/org/apache/ignite/GridTestTask.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/GridTestTask.java b/modules/core/src/test/java/org/apache/ignite/GridTestTask.java index 6ae2505..08a0994 100644 --- a/modules/core/src/test/java/org/apache/ignite/GridTestTask.java +++ b/modules/core/src/test/java/org/apache/ignite/GridTestTask.java @@ -27,7 +27,7 @@ import java.util.*; */ public class GridTestTask extends ComputeTaskSplitAdapter<Object, Object> { /** Logger. */ - @IgniteLoggerResource + @LoggerResource private IgniteLogger log; /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8a065d0c/modules/core/src/test/java/org/apache/ignite/cache/store/GridGeneratingTestStore.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/GridGeneratingTestStore.java b/modules/core/src/test/java/org/apache/ignite/cache/store/GridGeneratingTestStore.java index 9968f15..944320b 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/GridGeneratingTestStore.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/GridGeneratingTestStore.java @@ -34,7 +34,7 @@ public class GridGeneratingTestStore extends CacheStore<String, String> { private static final int DFLT_GEN_CNT = 100; /** */ - @IgniteCacheNameResource + @CacheNameResource private String cacheName; /** {@inheritDoc} */