public PartitionResolver getPartitionResolver() { // [GemFireXD] use PartitionAttributes to get the the resolver // since it may change after ALTER TABLE return this.partitionAttributes.getPartitionResolver(); }
public PartitionResolver getPartitionResolver() { // [SQLFabric] use PartitionAttributes to get the the resolver // since it may change after ALTER TABLE return this.partitionAttributes.getPartitionResolver(); }
protected static String getPartitionResolver(PartitionAttributes pa) { return pa.getPartitionResolver().toString(); } protected static String getColocatedWith(PartitionAttributes pa) {
public static GfxdPartitionResolver getResolver(AbstractRegion region) { PartitionAttributes<?, ?> pattrs = region.getPartitionAttributes(); PartitionResolver<?, ?> resolver; if (pattrs != null && (resolver = pattrs.getPartitionResolver()) instanceof GfxdPartitionResolver) { return (GfxdPartitionResolver)resolver; } return null; }
public static GfxdPartitionResolver getResolver(AbstractRegion region) { PartitionAttributes<?, ?> pattrs = region.getPartitionAttributes(); if (pattrs != null) { return (GfxdPartitionResolver)pattrs.getPartitionResolver(); } return null; }
public static GfxdPartitionResolver getResolver(AbstractRegion region) { PartitionAttributes<?, ?> pattrs = region.getPartitionAttributes(); if (pattrs != null) { return (GfxdPartitionResolver)pattrs.getPartitionResolver(); } return null; }
public static InternalPartitionResolver<?, ?> getInternalResolver( AbstractRegion region) { PartitionAttributes<?, ?> pattrs = region.getPartitionAttributes(); PartitionResolver<?, ?> resolver; if (pattrs != null && (resolver = pattrs.getPartitionResolver()) instanceof InternalPartitionResolver<?, ?>) { return (InternalPartitionResolver<?, ?>)resolver; } return null; }
private Object getRoutingObject(LocalRegion r, Object key, Object value) { GfxdPartitionResolver pr = (GfxdPartitionResolver)r .getPartitionAttributes().getPartitionResolver(); return pr.getRoutingObject(key, value, r); }
public Object[] getRoutingObjectsForKeys(Object[] regionKeysArray) { Object[] routingObjects = new Object[regionKeysArray.length]; GfxdPartitionResolver refResolver = (GfxdPartitionResolver) this.baseRegion .getPartitionAttributes().getPartitionResolver(); for (int i = 0; i < regionKeysArray.length; i++) { routingObjects[i] = refResolver.getRoutingObject(regionKeysArray[i], null, this.baseRegion); } return routingObjects; }
private Object getRoutingObject(LocalRegion r, Object key, Object value) { GfxdPartitionResolver pr = (GfxdPartitionResolver)r .getPartitionAttributes().getPartitionResolver(); return pr.getRoutingObject(key, value, r); }
public Object[] getRoutingObjectsForKeys(Object[] regionKeysArray) { Object[] routingObjects = new Object[regionKeysArray.length]; GfxdPartitionResolver refResolver = (GfxdPartitionResolver) this.baseRegion .getPartitionAttributes().getPartitionResolver(); for (int i = 0; i < regionKeysArray.length; i++) { routingObjects[i] = refResolver.getRoutingObject(regionKeysArray[i], null, this.baseRegion); } return routingObjects; }
private Object getRoutingObject(LocalRegion r, Object key, Object value) { InternalPartitionResolver<?, ?> pr = (InternalPartitionResolver<?, ?>)r .getPartitionAttributes().getPartitionResolver(); return pr.getRoutingObject(key, value, null, r); }
public Object[] getRoutingObjectsForKeys(Object[] regionKeysArray) { Object[] routingObjects = new Object[regionKeysArray.length]; GfxdPartitionResolver refResolver = (GfxdPartitionResolver) this.baseRegion .getPartitionAttributes().getPartitionResolver(); for (int i = 0; i < regionKeysArray.length; i++) { routingObjects[i] = refResolver.getRoutingObject(regionKeysArray[i], null, this.baseRegion); } return routingObjects; }
public final void setMasterTable(String masterTable) { this.masterTable = masterTable; if (this.masterTable != null) { final Region<?, ?> masterRegion = Misc.getRegionByPath(this.masterTable, true); this.masterResolver = (GfxdPartitionResolver)masterRegion.getAttributes() .getPartitionAttributes().getPartitionResolver(); } }
public final void setMasterTable(String masterTable) { this.masterTable = masterTable; if (this.masterTable != null) { final Region<?, ?> masterRegion = Misc.getRegionByPath(this.masterTable, true); this.masterResolver = (GfxdPartitionResolver)masterRegion.getAttributes() .getPartitionAttributes().getPartitionResolver(); } }
public final void setMasterTable(String masterTable) { this.masterTable = masterTable; if (this.masterTable != null) { final Region<?, ?> masterRegion = Misc.getRegionByPath(this.masterTable, true); this.masterResolver = (GfxdPartitionResolver)masterRegion.getAttributes() .getPartitionAttributes().getPartitionResolver(); } }
@Override public boolean isColocatedWith(Optimizable other) throws StandardException { final Optimizable opt = getBaseTable(); final Optimizable othrOpt = other.getBaseTable(); if (opt == null || !opt.isBaseTable() || othrOpt == null || !othrOpt.isBaseTable()) { return false; } final PartitionAttributes<?, ?> pat = opt.getTableDescriptor().getRegion() .getAttributes().getPartitionAttributes(); final PartitionAttributes<?, ?> otherPat = othrOpt.getTableDescriptor() .getRegion().getAttributes().getPartitionAttributes(); return ((GfxdPartitionResolver)pat.getPartitionResolver()).getMasterTable( true).equals( ((GfxdPartitionResolver)otherPat.getPartitionResolver()) .getMasterTable(true)); }
@Override public boolean isColocatedWith(Optimizable other) throws StandardException { final Optimizable opt = getBaseTable(); final Optimizable othrOpt = other.getBaseTable(); if (opt == null || !opt.isBaseTable() || othrOpt == null || !othrOpt.isBaseTable()) { return false; } final PartitionAttributes<?, ?> pat = opt.getTableDescriptor().getRegion() .getAttributes().getPartitionAttributes(); final PartitionAttributes<?, ?> otherPat = othrOpt.getTableDescriptor() .getRegion().getAttributes().getPartitionAttributes(); return ((GfxdPartitionResolver)pat.getPartitionResolver()).getMasterTable( true).equals( ((GfxdPartitionResolver)otherPat.getPartitionResolver()) .getMasterTable(true)); }
@SuppressWarnings("unchecked") public void setAll(@SuppressWarnings("rawtypes") PartitionAttributes pa) { setRedundantCopies(pa.getRedundantCopies()); setLocalProperties(pa.getLocalProperties()); setGlobalProperties(pa.getGlobalProperties()); setLocalMaxMemory(pa.getLocalMaxMemory()); setTotalMaxMemory(pa.getTotalMaxMemory()); setTotalNumBuckets(pa.getTotalNumBuckets()); setPartitionResolver(pa.getPartitionResolver()); setColocatedWith(pa.getColocatedWith()); setRecoveryDelay(pa.getRecoveryDelay()); setStartupRecoveryDelay(pa.getStartupRecoveryDelay()); setOffHeap(((PartitionAttributesImpl) pa).getOffHeap()); addFixedPartitionAttributes(pa.getFixedPartitionAttributes()); }
@SuppressWarnings("unchecked") public void setAll(@SuppressWarnings("rawtypes") PartitionAttributes pa) { setRedundantCopies(pa.getRedundantCopies()); setLocalProperties(pa.getLocalProperties()); setGlobalProperties(pa.getGlobalProperties()); setLocalMaxMemory(pa.getLocalMaxMemory()); setTotalMaxMemory(pa.getTotalMaxMemory()); setTotalNumBuckets(pa.getTotalNumBuckets()); setPartitionResolver(pa.getPartitionResolver()); setColocatedWith(pa.getColocatedWith()); setRecoveryDelay(pa.getRecoveryDelay()); setStartupRecoveryDelay(pa.getStartupRecoveryDelay()); setEnableOffHeapMemory(((PartitionAttributesImpl) pa).getEnableOffHeapMemory()); addFixedPartitionAttributes(pa.getFixedPartitionAttributes()); }