@Override public boolean equals(Object another) { if (another instanceof AbstractNode) { AbstractNode<?, ?> anotherNode = (AbstractNode) another; return fqn == null && anotherNode.fqn == null || !(fqn == null || anotherNode.fqn == null) && fqn.equals(anotherNode.fqn); } return false; }
@Override public boolean equals(Object o) { if (!(o instanceof ExpirationEntry)) return false; ExpirationEntry ee = (ExpirationEntry) o; return expiration == ee.expiration && fqn.equals(ee.fqn); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; RegionImpl region = (RegionImpl) o; if (fqn != null ? !fqn.equals(region.fqn) : region.fqn != null) return false; return true; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; AbstractDataCommand that = (AbstractDataCommand) o; return !(fqn != null ? !fqn.equals(that.fqn) : that.fqn != null); }
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GravitateResult that = (GravitateResult) o; if (dataFound != that.dataFound) return false; if (buddyBackupFqn != null ? !buddyBackupFqn.equals(that.buddyBackupFqn) : that.buddyBackupFqn != null) return false; if (nodeData != null ? !nodeData.equals(that.nodeData) : that.nodeData != null) return false; return true; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; NodeData nodeData = (NodeData) o; if (attrs != null ? !attrs.equals(nodeData.attrs) : nodeData.attrs != null) return false; if (fqn != null ? !fqn.equals(nodeData.fqn) : nodeData.fqn != null) return false; return true; }
@Override public boolean equals(Object other) { if (other == this) return true; if (other == null) return false; if (other.getClass().equals(StringFqn.class)) { return stringRepresentation.equals(((StringFqn) other).stringRepresentation); } else { return super.equals(other); } }
@Override public boolean equals(Object o) { if (!(o instanceof NodeEntry)) return false; NodeEntry ne = (NodeEntry) o; return fqn.equals(ne.getFqn()); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; DataGravitationCleanupCommand that = (DataGravitationCleanupCommand) o; if (backup != null ? !backup.equals(that.backup) : that.backup != null) return false; if (globalTransaction != null ? !globalTransaction.equals(that.globalTransaction) : that.globalTransaction != null) return false; return true; }
@Override public boolean equals(Object o) { if (!super.equals(o)) return false; AbstractVersionedDataCommand that = (AbstractVersionedDataCommand) o; return !(fqn != null ? !fqn.equals(that.fqn) : that.fqn != null); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; MoveCommand that = (MoveCommand) o; if (to != null ? !to.equals(that.to) : that.to != null) return false; return true; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; EventImpl event = (EventImpl) o; if (originLocal != event.originLocal) return false; if (pre != event.pre) return false; if (successful != event.successful) return false; if (cache != null ? !cache.equals(event.cache) : event.cache != null) return false; if (data != null ? !data.equals(event.data) : event.data != null) return false; if (fqn != null ? !fqn.equals(event.fqn) : event.fqn != null) return false; if (modificationType != event.modificationType) return false; if (targetFqn != null ? !targetFqn.equals(event.targetFqn) : event.targetFqn != null) return false; if (transaction != null ? !transaction.equals(event.transaction) : event.transaction != null) return false; if (newView != null ? !newView.equals(event.newView) : event.newView != null) return false; if (buddyGroup != null ? !buddyGroup.equals(event.buddyGroup) : event.buddyGroup != null) return false; if (type != null ? !type.equals(event.type) : event.type != null) return false; return true; }
@Override public boolean equals(Object o) { if (!(o instanceof EvictionListEntry)) return false; EvictionListEntry entry = (EvictionListEntry) o; return this.node.getFqn().equals(entry.node.getFqn()); }
/** * Creates a node in the cache, specified by the given Fqn. */ public Object perform(InvocationContext ctx) { Object[] results = dataContainer.createNodes(fqn); List<NodeSPI> created = (List<NodeSPI>) results[0]; boolean foundFqn = false; if (!created.isEmpty()) { for (NodeSPI n : created) { if (fqn.equals(n.getFqn())) foundFqn = true; newlyCreated.add(n.getFqn()); } } if (newlyCreated != null && !foundFqn) newlyCreated.remove(fqn); return results[1]; }
/** * Returns the <code>EvictionRegionConfig</code> coresponding to given region fqn, or <code>null</code> if no * match is found. */ public EvictionRegionConfig getEvictionRegionConfig(String region) { Fqn fqn = Fqn.fromString(region); for (EvictionRegionConfig evConfig : getEvictionRegionConfigs()) { if (evConfig.getRegionFqn().equals(fqn)) { return evConfig; } } return null; }
public void addEvictionRegionConfig(EvictionRegionConfig evictionRegionConfig) { testImmutability("evictionRegionConfigs"); if (evictionRegionConfig.getRegionFqn().isRoot() || evictionRegionConfig.getRegionFqn().equals(RegionManagerImpl.DEFAULT_REGION)) { mergeWithDefault(evictionRegionConfig); } else { evictionRegionConfigs.add(evictionRegionConfig); } }
public Fqn getActualFqn(Fqn fqn) { if (!isBackupFqn(fqn)) return fqn; if (fqn.equals(BUDDY_BACKUP_SUBTREE_FQN)) return Fqn.ROOT; // remove the first 2 (or 3 in the case of a dead backup region) elements boolean isDead = isDeadBackupFqn(fqn); int fqnSz = fqn.size(); if (isDead && fqnSz == 2) return Fqn.ROOT; return fqn.getSubFqn(isDead ? 3 : 2, fqnSz); }
public void setEvictionRegionConfigs(List<EvictionRegionConfig> evictionRegionConfigs) { testImmutability("evictionRegionConfigs"); EvictionRegionConfig toRemove = null; for (EvictionRegionConfig erc : evictionRegionConfigs) { if (erc.getRegionFqn().isRoot() || erc.getRegionFqn().equals(RegionManagerImpl.DEFAULT_REGION)) { mergeWithDefault(erc); toRemove = erc; break; } } if (toRemove != null) evictionRegionConfigs.remove(toRemove); this.evictionRegionConfigs = evictionRegionConfigs; }
/** * Monitors cache events and updates the local cache * * @param event */ @NodeRemoved public void nodeRemoved(NodeRemovedEvent event) { if (event.isPre()) return; Fqn fqn = event.getFqn(); Fqn regFqn = getRegionFqn(); if (fqn.size() == regFqn.size() + 1 && fqn.isChildOf(regFqn)) { Object key = fqn.get(regFqn.size()); localCache.remove(key); } else if (fqn.equals(regFqn)) { localCache.clear(); } }
/** * Monitors cache events and updates the local cache * * @param event */ @NodeRemoved public void nodeRemoved(NodeRemovedEvent event) { if (event.isPre()) return; Fqn fqn = event.getFqn(); Fqn regFqn = getRegionFqn(); if (fqn.size() == regFqn.size() + 1 && fqn.isChildOf(regFqn)) { Object key = fqn.get(regFqn.size()); localCache.remove(key); } else if (fqn.equals(regFqn)) { localCache.clear(); } }