@Override public void setPropertyByIndex(long propIndex, byte propertyType, Object propertyValue) { _resolver.alignState(this).set(propIndex, propertyType, propertyValue); } }
@Override public Node forceSetAt(int index, byte type, Object value) { final NodeState preciseState = this._resolver.alignState(this); if (preciseState != null) { preciseState.set(index, type, value); } else { throw new RuntimeException(Constants.CACHE_MISS_ERROR); } return this; }
@Override public void forceProperty(String propertyName, byte propertyType, Object propertyValue) { final long hashed = this._resolver.stringToHash(propertyName, true); final NodeState preciseState = this._resolver.alignState(this); if (preciseState != null) { preciseState.set(hashed, propertyType, propertyValue); } else { throw new RuntimeException(Constants.CACHE_MISS_ERROR); } }
@Override public Node setAt(int index, byte type, Object value) { final NodeState unPhasedState = this._resolver.resolveState(this); boolean isDiff = (type != unPhasedState.getType(index)); if (!isDiff) { isDiff = !isEquals(unPhasedState.get(index), value, type); } if (isDiff) { final NodeState preciseState = this._resolver.alignState(this); if (preciseState != null) { preciseState.set(index, type, value); } else { throw new RuntimeException(Constants.CACHE_MISS_ERROR); } } return this; }
@Override public void setProperty(String propertyName, byte propertyType, Object propertyValue) { //hash the property a single time final long hashed = this._resolver.stringToHash(propertyName, true); final NodeState unPhasedState = this._resolver.resolveState(this); boolean isDiff = (propertyType != unPhasedState.getType(hashed)); if (!isDiff) { isDiff = !isEquals(unPhasedState.get(hashed), propertyValue, propertyType); } if (isDiff) { final NodeState preciseState = this._resolver.alignState(this); if (preciseState != null) { preciseState.set(hashed, propertyType, propertyValue); } else { throw new RuntimeException(Constants.CACHE_MISS_ERROR); } } }