Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.hz.spi classes/interface privateapi #15401

Merged
merged 1 commit into from Aug 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -21,6 +21,7 @@
import com.hazelcast.partition.PartitioningStrategy;
import com.hazelcast.nio.serialization.Data;
import com.hazelcast.partition.strategy.StringPartitioningStrategy;
import com.hazelcast.spi.annotation.PrivateApi;
import com.hazelcast.spi.impl.operationservice.Operation;
import com.hazelcast.spi.impl.operationservice.OperationService;
import com.hazelcast.version.Version;
Expand All @@ -30,6 +31,7 @@
*
* @param <S>
*/
@PrivateApi
public abstract class AbstractDistributedObject<S extends RemoteService> implements DistributedObject {

protected static final PartitioningStrategy PARTITIONING_STRATEGY = StringPartitioningStrategy.INSTANCE;
Expand Down
Expand Up @@ -17,10 +17,12 @@
package com.hazelcast.spi;

import com.hazelcast.nio.Address;
import com.hazelcast.spi.annotation.PrivateApi;

/**
* Implemented by a service that can cancel its operations.
*/
@PrivateApi
public interface CanCancelOperations {
/**
* Notifies this service that an operation was requested to be cancelled. The caller is not aware which
Expand Down
Expand Up @@ -16,11 +16,14 @@

package com.hazelcast.spi;

import com.hazelcast.spi.annotation.PrivateApi;

/**
* A interface that can be implemented by a SPI Service so that it can be notified about client disconnects.
* <p>
* This is useful if a service needs to cleanup resources when a client leaves, e.g. release locks.
*/
@PrivateApi
public interface ClientAwareService {

/**
Expand Down
Expand Up @@ -16,12 +16,15 @@

package com.hazelcast.spi;

import com.hazelcast.spi.annotation.PrivateApi;

/**
* A capability for SPI services. So if your SPI service needs to be configured, implement this method. It will get the
* configured properties injected.
*
* @param <T>
*/
@PrivateApi
public interface ConfigurableService<T> {

void configure(T configObject);
Expand Down
Expand Up @@ -19,6 +19,7 @@
import com.hazelcast.nio.ObjectDataInput;
import com.hazelcast.nio.ObjectDataOutput;
import com.hazelcast.nio.serialization.IdentifiedDataSerializable;
import com.hazelcast.spi.annotation.PrivateApi;
import com.hazelcast.spi.impl.SpiDataSerializerHook;

import java.io.IOException;
Expand All @@ -28,6 +29,7 @@
*
* @since 3.9
*/
@PrivateApi
public final class DistributedObjectNamespace implements ObjectNamespace, IdentifiedDataSerializable {

private String service;
Expand Down
3 changes: 3 additions & 0 deletions hazelcast/src/main/java/com/hazelcast/spi/EventFilter.java
Expand Up @@ -16,9 +16,12 @@

package com.hazelcast.spi;

import com.hazelcast.spi.annotation.PrivateApi;

/**
* A predicate that can filter out events.
*/
@PrivateApi
public interface EventFilter {

/**
Expand Down
Expand Up @@ -16,13 +16,16 @@

package com.hazelcast.spi;

import com.hazelcast.spi.annotation.PrivateApi;

/**
* A service for publishing events. For example a Topic that receives an message (the event)
* and dispatches it to a listener.
*
* @param <E> the event type
* @param <T> the event listener type
*/
@PrivateApi
public interface EventPublishingService<E, T> {

/**
Expand Down
Expand Up @@ -18,10 +18,12 @@

import com.hazelcast.nio.Address;
import com.hazelcast.nio.serialization.IdentifiedDataSerializable;
import com.hazelcast.spi.annotation.PrivateApi;

/**
* The result of a Event Registration.
*/
@PrivateApi
public interface EventRegistration extends IdentifiedDataSerializable {

/**
Expand Down
3 changes: 3 additions & 0 deletions hazelcast/src/main/java/com/hazelcast/spi/EventService.java
Expand Up @@ -16,12 +16,15 @@

package com.hazelcast.spi;

import com.hazelcast.spi.annotation.PrivateApi;

import javax.annotation.Nonnull;
import java.util.Collection;

/**
* Component responsible for handling events like topic events or map.listener events. The events are divided into topics.
*/
@PrivateApi
public interface EventService {

/**
Expand Down
Expand Up @@ -18,6 +18,7 @@

import com.hazelcast.core.ICompletableFuture;
import com.hazelcast.map.MapLoader;
import com.hazelcast.spi.annotation.PrivateApi;
import com.hazelcast.util.executor.ExecutorType;
import com.hazelcast.util.executor.ManagedExecutorService;

Expand All @@ -32,6 +33,7 @@
*
* It also has functionality for scheduling tasks.
*/
@PrivateApi
public interface ExecutionService {

/**
Expand Down
Expand Up @@ -16,12 +16,15 @@

package com.hazelcast.spi;

import com.hazelcast.spi.annotation.PrivateApi;

import java.util.concurrent.TimeUnit;

/**
* An interface that can be implemented by SPI services to participate in graceful shutdown process, such as moving
* their internal data to another node or releasing their allocated resources gracefully.
*/
@PrivateApi
public interface GracefulShutdownAwareService {

/**
Expand Down
Expand Up @@ -16,9 +16,12 @@

package com.hazelcast.spi;

import com.hazelcast.spi.annotation.PrivateApi;

/**
* Can be implemented by DistributedObject (proxies) to indicate that they want to be initialized.
*/
@PrivateApi
public interface InitializingObject {

void initialize();
Expand Down
Expand Up @@ -17,13 +17,15 @@
package com.hazelcast.spi;

import com.hazelcast.core.ICompletableFuture;
import com.hazelcast.spi.annotation.PrivateApi;

/**
* A {@link com.hazelcast.core.ICompletableFuture} with more functionality like getting
* the result without needing to deal with checked exceptions.
*
* @param <E>
*/
@PrivateApi
public interface InternalCompletableFuture<E> extends ICompletableFuture<E> {

/**
Expand Down
Expand Up @@ -16,9 +16,12 @@

package com.hazelcast.spi;

import com.hazelcast.spi.annotation.PrivateApi;

/**
* Contract point for {@link com.hazelcast.spi.EventFilter} instances these wrap listeners.
*/
@PrivateApi
public interface ListenerWrapperEventFilter extends EventFilter {

/**
Expand Down
Expand Up @@ -16,12 +16,15 @@

package com.hazelcast.spi;

import com.hazelcast.spi.annotation.PrivateApi;

/**
* Interface to be implemented by services that need to intercept lock operation
* for distributed objects it manages.
*
* @param <T> type of key
*/
@PrivateApi
public interface LockInterceptorService<T> {

void onBeforeLock(String distributedObjectName, T key);
Expand Down
3 changes: 3 additions & 0 deletions hazelcast/src/main/java/com/hazelcast/spi/ManagedService.java
Expand Up @@ -16,6 +16,8 @@

package com.hazelcast.spi;

import com.hazelcast.spi.annotation.PrivateApi;

import java.util.Properties;

/**
Expand All @@ -26,6 +28,7 @@
* <li>reset</li>
* </ol>
*/
@PrivateApi
public interface ManagedService {

/**
Expand Down
Expand Up @@ -16,12 +16,13 @@

package com.hazelcast.spi;

import com.hazelcast.cluster.Member;
import com.hazelcast.cluster.MemberAttributeOperationType;
import com.hazelcast.cluster.Cluster;
import com.hazelcast.cluster.Member;
import com.hazelcast.cluster.MemberAttributeEvent;
import com.hazelcast.cluster.MemberAttributeOperationType;
import com.hazelcast.cluster.impl.MemberImpl;
import com.hazelcast.nio.serialization.SerializableByConvention;
import com.hazelcast.spi.annotation.PrivateApi;

import java.util.Set;

Expand All @@ -30,6 +31,7 @@
/**
* This service event is fired to inform services about a change in a member's attributes collection
*/
@PrivateApi
@SerializableByConvention(PUBLIC_API)
public class MemberAttributeServiceEvent extends MemberAttributeEvent {

Expand Down
Expand Up @@ -16,12 +16,15 @@

package com.hazelcast.spi;

import com.hazelcast.spi.annotation.PrivateApi;

/**
* An interface that can be implemented by a SPI service that needs to be notified members joining and leaving
* the cluster.
*
* @author mdogan 9/5/12
*/
@PrivateApi
public interface MembershipAwareService {

/**
Expand Down
Expand Up @@ -18,13 +18,15 @@

import com.hazelcast.cluster.MembershipEvent;
import com.hazelcast.cluster.impl.MemberImpl;
import com.hazelcast.spi.annotation.PrivateApi;

/**
* Membership event fired when a new member is added
* to the cluster and/or when a member leaves the cluster.
*
* @see com.hazelcast.spi.MembershipAwareService
*/
@PrivateApi
public class MembershipServiceEvent extends MembershipEvent {

public MembershipServiceEvent(MembershipEvent e) {
Expand Down
2 changes: 2 additions & 0 deletions hazelcast/src/main/java/com/hazelcast/spi/NodeAware.java
Expand Up @@ -17,10 +17,12 @@
package com.hazelcast.spi;

import com.hazelcast.instance.impl.Node;
import com.hazelcast.spi.annotation.PrivateApi;

/**
* A 'capability' that can be implemented by object to get the Node injected.
*/
@PrivateApi
public interface NodeAware {

void setNode(Node node);
Expand Down
6 changes: 4 additions & 2 deletions hazelcast/src/main/java/com/hazelcast/spi/NodeEngine.java
Expand Up @@ -16,15 +16,16 @@

package com.hazelcast.spi;

import com.hazelcast.config.Config;
import com.hazelcast.cluster.Cluster;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.cluster.Member;
import com.hazelcast.config.Config;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.internal.cluster.ClusterService;
import com.hazelcast.logging.ILogger;
import com.hazelcast.nio.Address;
import com.hazelcast.nio.serialization.Data;
import com.hazelcast.quorum.QuorumService;
import com.hazelcast.spi.annotation.PrivateApi;
import com.hazelcast.spi.impl.operationservice.OperationService;
import com.hazelcast.spi.merge.SplitBrainMergePolicyProvider;
import com.hazelcast.spi.partition.IPartitionService;
Expand All @@ -42,6 +43,7 @@
* So if you are writing a custom SPI service, such as a stack-service, this service should probably implement
* the {@link ManagedService} so you can get access to the services within the system.
*/
@PrivateApi
public interface NodeEngine {

/**
Expand Down
Expand Up @@ -16,11 +16,14 @@

package com.hazelcast.spi;

import com.hazelcast.spi.annotation.PrivateApi;

/**
* Contract point for event listeners to be notified by {@link com.hazelcast.spi.EventService}.
*
* @param <S> the type of the {@link com.hazelcast.spi.ManagedService}
*/
@PrivateApi
public interface NotifiableEventListener<S> {

/**
Expand Down
Expand Up @@ -16,9 +16,12 @@

package com.hazelcast.spi;

import com.hazelcast.spi.annotation.PrivateApi;

/**
* An ObjectNamespace that makes identification of object within a service possible.
*/
@PrivateApi
public interface ObjectNamespace extends ServiceNamespace {

/**
Expand Down
Expand Up @@ -16,13 +16,15 @@

package com.hazelcast.spi;

import com.hazelcast.spi.annotation.PrivateApi;
import com.hazelcast.spi.impl.operationservice.Operation;
import com.hazelcast.spi.impl.operationservice.PartitionAwareOperation;

/**
* Marker interface for services that want to return operations to be executed on the cluster
* members after a join has been finalized.
*/
@PrivateApi
public interface PostJoinAwareService {

/**
Expand Down
Expand Up @@ -16,6 +16,7 @@

package com.hazelcast.spi;

import com.hazelcast.spi.annotation.PrivateApi;
import com.hazelcast.spi.impl.operationservice.Operation;
import com.hazelcast.spi.impl.operationservice.PartitionAwareOperation;

Expand All @@ -28,6 +29,7 @@
*
* @since 3.9
*/
@PrivateApi
public interface PreJoinAwareService {

/**
Expand Down