use of org.apache.geode.internal.cache.persistence.DiskRecoveryStore in project geode by apache.
the class VMStatsDiskLRURegionEntryHeapObjectKey method diskInitialize.
// 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);
}
use of org.apache.geode.internal.cache.persistence.DiskRecoveryStore in project geode by apache.
the class VMStatsDiskLRURegionEntryHeapStringKey2 method diskInitialize.
// 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);
}
use of org.apache.geode.internal.cache.persistence.DiskRecoveryStore in project geode by apache.
the class VMStatsDiskLRURegionEntryOffHeapLongKey method diskInitialize.
// 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);
}
use of org.apache.geode.internal.cache.persistence.DiskRecoveryStore in project geode by apache.
the class VMStatsDiskRegionEntryOffHeapStringKey1 method diskInitialize.
// 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);
}
use of org.apache.geode.internal.cache.persistence.DiskRecoveryStore in project geode by apache.
the class Oplog method readRVVRecord.
private void readRVVRecord(DataInput dis, File f, boolean gcRVV, boolean latestOplog) throws IOException {
final boolean isPersistRecoveryDebugEnabled = logger.isTraceEnabled(LogMarker.PERSIST_RECOVERY);
long numRegions = InternalDataSerializer.readUnsignedVL(dis);
if (isPersistRecoveryDebugEnabled) {
logger.trace(LogMarker.PERSIST_RECOVERY, "readRVV entry numRegions={}", numRegions);
}
for (int region = 0; region < numRegions; region++) {
long drId = InternalDataSerializer.readUnsignedVL(dis);
// Get the drs. This may be null if this region is not currently
// recovering
DiskRecoveryStore drs = getOplogSet().getCurrentlyRecovering(drId);
if (isPersistRecoveryDebugEnabled) {
logger.trace(LogMarker.PERSIST_RECOVERY, "readRVV drId={} region={}", drId, drs);
}
if (gcRVV) {
// Read the GCC RV
long rvvSize = InternalDataSerializer.readUnsignedVL(dis);
for (int memberNum = 0; memberNum < rvvSize; memberNum++) {
// for each member, read the member id and version
long memberId = InternalDataSerializer.readUnsignedVL(dis);
long gcVersion = InternalDataSerializer.readUnsignedVL(dis);
// if we have a recovery store, add the recovered regions
if (drs != null) {
Object member = getParent().getDiskInitFile().getCanonicalObject((int) memberId);
drs.recordRecoveredGCVersion((VersionSource) member, gcVersion);
if (isPersistRecoveryDebugEnabled) {
logger.trace(LogMarker.PERSIST_RECOVERY, "adding gcRVV entry drId={}, member={}, version={}", drId, memberId, gcVersion);
}
} else {
if (isPersistRecoveryDebugEnabled) {
logger.trace(LogMarker.PERSIST_RECOVERY, "skipping gcRVV entry drId={}, member={}, version={}", drId, memberId, gcVersion);
}
}
}
} else {
boolean rvvTrusted = DataSerializer.readBoolean(dis);
if (drs != null) {
if (latestOplog) {
// only set rvvtrust based on the newest oplog recovered
drs.setRVVTrusted(rvvTrusted);
if (isPersistRecoveryDebugEnabled) {
logger.trace(LogMarker.PERSIST_RECOVERY, "marking RVV trusted drId={},tvvTrusted={}", drId, rvvTrusted);
}
}
}
// Read a regular RVV
long rvvSize = InternalDataSerializer.readUnsignedVL(dis);
for (int memberNum = 0; memberNum < rvvSize; memberNum++) {
// for each member, read the member id and version
long memberId = InternalDataSerializer.readUnsignedVL(dis);
RegionVersionHolder versionHolder = new RegionVersionHolder(dis);
if (drs != null) {
Object member = getParent().getDiskInitFile().getCanonicalObject((int) memberId);
drs.recordRecoveredVersonHolder((VersionSource) member, versionHolder, latestOplog);
if (isPersistRecoveryDebugEnabled) {
logger.trace(LogMarker.PERSIST_RECOVERY, "adding RVV entry drId={},member={},versionHolder={},latestOplog={},oplogId={}", drId, memberId, versionHolder, latestOplog, getOplogId());
}
} else {
if (isPersistRecoveryDebugEnabled) {
logger.trace(LogMarker.PERSIST_RECOVERY, "skipping RVV entry drId={}, member={}, versionHolder={}", drId, memberId, versionHolder);
}
}
}
}
}
readEndOfRecord(dis);
}
Aggregations