// DO NOT modify this class. It was generated from LeafRegionEntry.cpp
 private void diskInitialize(RegionEntryContext context, Object value) {
   DiskRecoveryStore drs = (DiskRecoveryStore) context;
   DiskStoreImpl ds = drs.getDiskStore();
   long maxOplogSize = ds.getMaxOplogSize();
   // get appropriate instance of DiskId implementation based on maxOplogSize
   this.id = DiskId.createDiskId(maxOplogSize, true /* is persistence */, ds.needsLinkedList());
   Helper.initialize(this, drs, value);
 }
コード例 #2
0
  public static RegionMBeanBridge getInstance(Region region) {

    if (region.getAttributes().getPartitionAttributes() != null) {

      RegionMBeanBridge bridge = new PartitionedRegionBridge(region);
      PartitionedRegion parRegion = ((PartitionedRegion) region);
      DiskStoreImpl dsi = parRegion.getDiskStore();
      if (dsi != null) {
        DiskRegionStats stats = parRegion.getDiskRegionStats();

        DiskRegionBridge diskRegionBridge = new DiskRegionBridge(stats);
        bridge.addDiskRegionBridge(diskRegionBridge);

        for (DirectoryHolder dh : dsi.getDirectoryHolders()) {
          diskRegionBridge.addDirectoryStats(dh.getDiskDirectoryStats());
        }

        bridge.addDiskRegionBridge(diskRegionBridge);
      }

      return bridge;

    } else {
      RegionMBeanBridge bridge = new RegionMBeanBridge(region);

      LocalRegion localRegion = ((LocalRegion) region);
      DiskStoreImpl dsi = localRegion.getDiskStore();
      if (dsi != null) {
        DiskRegionBridge diskRegionBridge =
            new DiskRegionBridge(localRegion.getDiskRegion().getStats());
        bridge.addDiskRegionBridge(diskRegionBridge);

        for (DirectoryHolder dh : dsi.getDirectoryHolders()) {
          diskRegionBridge.addDirectoryStats(dh.getDiskDirectoryStats());
        }
      }
      return bridge;
    }
  }