@Override public OClusterSelectionStrategy getClusterSelection() { return delegate.getClusterSelection(); }
@Override public Set<String> getInvolvedClusters() { if (clazz != null) return Collections.singleton(getDatabase().getClusterNameById(clazz.getClusterSelection().getCluster(clazz, null))); else if (clusterName != null) return getInvolvedClustersOfClusters(Collections.singleton(clusterName)); return Collections.EMPTY_SET; }
@Override public Set<String> getInvolvedClusters() { if (clazz != null) return Collections.singleton(getDatabase().getClusterNameById(clazz.getClusterSelection().getCluster(clazz, null))); else if (clusterName != null) return getInvolvedClustersOfClusters(Collections.singleton(clusterName)); return Collections.EMPTY_SET; }
@Override public Set<String> getInvolvedClusters() { if (clazz != null) return Collections.singleton(getDatabase().getClusterNameById(clazz.getClusterSelection().getCluster(clazz, null))); else if (clusterName != null) return getInvolvedClustersOfClusters(Collections.singleton(clusterName)); return Collections.EMPTY_SET; }
@Override public Set<String> getInvolvedClusters() { if (clazz != null) return Collections.singleton(getDatabase().getClusterNameById(clazz.getClusterSelection().getCluster(clazz, null))); else if (clusterName != null) return getInvolvedClustersOfClusters(Collections.singleton(clusterName)); return Collections.EMPTY_SET; }
if("clusterSelection".equals(critery)) OClusterSelectionStrategy strategy = entity.getClusterSelection(); return (V)(strategy!=null?strategy.getName():null);
@Override public Set<String> getInvolvedClusters() { if (className != null) { final OClass clazz = ((OMetadataInternal) getDatabase().getMetadata()).getImmutableSchemaSnapshot().getClass(className); return Collections.singleton(getDatabase().getClusterNameById(clazz.getClusterSelection().getCluster(clazz, null))); } else if (clusterName != null) return getInvolvedClustersOfClusters(Collections.singleton(clusterName)); return Collections.EMPTY_SET; }
public OImmutableClass(final OClass oClass, final OImmutableSchema schema) { isAbstract = oClass.isAbstract(); strictMode = oClass.isStrictMode(); this.schema = schema; superClassesNames = oClass.getSuperClassesNames(); superClasses = new ArrayList<OImmutableClass>(superClassesNames.size()); name = oClass.getName(); streamAbleName = oClass.getStreamableName(); clusterSelection = oClass.getClusterSelection(); defaultClusterId = oClass.getDefaultClusterId(); clusterIds = oClass.getClusterIds(); polymorphicClusterIds = oClass.getPolymorphicClusterIds(); baseClassesNames = new ArrayList<String>(); for (OClass baseClass : oClass.getSubclasses()) baseClassesNames.add(baseClass.getName()); overSize = oClass.getOverSize(); classOverSize = oClass.getClassOverSize(); shortName = oClass.getShortName(); properties = new HashMap<String, OProperty>(); for (OProperty p : oClass.declaredProperties()) properties.put(p.getName(), new OImmutableProperty(p, this)); Map<String, String> customFields = new HashMap<String, String>(); for (String key : oClass.getCustomKeys()) customFields.put(key, oClass.getCustom(key)); this.customFields = Collections.unmodifiableMap(customFields); this.description = oClass.getDescription(); }
message("\nCluster selection....: " + cls.getClusterSelection().getName()); message("\nOversize.............: " + cls.getClassOverSize());
if (cls.isAbstract()) writer.writeAttribute(0, false, "abstract", cls.isAbstract()); writer.writeAttribute(0, false, "cluster-selection", cls.getClusterSelection().getName()); // @SINCE 1.7
assertEquals("NewClass", newClass.getName()); newClass.setClusterSelection(ORoundRobinClusterSelectionStrategy.NAME); assertEquals(ORoundRobinClusterSelectionStrategy.NAME, newClass.getClusterSelection().getName()); Collection<OProperty> properties = newClass.properties(); assertNotNull(properties); assertFalse(realizedNewClass instanceof IPrototype); assertEquals("NewClass", realizedNewClass.getName()); assertEquals(ORoundRobinClusterSelectionStrategy.NAME, realizedNewClass.getClusterSelection().getName()); wicket.getTester().getSchema().dropClass(realizedNewClass.getName());