7 Kasım 2022 Pazartesi

HazelcastAPI MapService Sınıfı - Diğer Servislere Erişim Sağlar

Giriş
Şu satırı dahil ederiz
import com.hazelcast.map.impl.MapService;
Sınıfın içi şöyle
public class MapService implements ManagedService, ChunkedMigrationAwareService,
  TransactionalService, RemoteService,
  EventPublishingService<Object, ListenerAdapter>,
  PostJoinAwareService, SplitBrainHandlerService,
  WanSupportingService, StatisticsAwareService<LocalMapStats>,
  PartitionAwareService, ClientAwareService,
  SplitBrainProtectionAwareService, NotifiableEventListener,
  ClusterStateListener, LockInterceptorService<Data>,
  DynamicMetricsProvider, TenantContextAwareService,
  OffloadedReplicationPreparation {

  public static final String SERVICE_NAME = "hz:impl:mapService";

  protected ManagedService managedService;
  protected CountingMigrationAwareService migrationAwareService;
  protected TransactionalService transactionalService;
  protected RemoteService remoteService;
  protected EventPublishingService eventPublishingService;
  protected PostJoinAwareService postJoinAwareService;
  protected SplitBrainHandlerService splitBrainHandlerService;
  protected WanSupportingService wanSupportingService;
  protected StatisticsAwareService statisticsAwareService;
  protected PartitionAwareService partitionAwareService;
  protected ClientAwareService clientAwareService;
  protected MapSplitBrainProtectionAwareService splitBrainProtectionAwareService;
  protected MapServiceContext mapServiceContext;
  ...
}
MapServiceContext alanı MapContainer nesnesine erişmek içindir. MapContainer bir IMap nesnesini temsil eder.

Örnek
Şöyle yaparız
MapService mapService = nodeEngine.getService(MapService.SERVICE_NAME);
return mapService.getMapServiceContext().getMapContainers().get(name);


Hiç yorum yok:

Yorum Gönder

THIRD-PARTY.txt Dosyası

Kullanılan harici kütüphanelerin sürümleri bu dosyada Dosyanın yolu şöyle hazelcast/licenses/THIRD-PARTY.txt