public static Grouping._Fields groupingType(Grouping grouping) { return grouping.getSetField(); }
public NullStruct get_shuffle() { if (getSetField() == _Fields.SHUFFLE) { return (NullStruct)getFieldValue(); } else { throw new java.lang.RuntimeException("Cannot get field 'shuffle' because union is currently set to " + getFieldDesc(getSetField()).name); } }
public NullStruct get_all() { if (getSetField() == _Fields.ALL) { return (NullStruct)getFieldValue(); } else { throw new java.lang.RuntimeException("Cannot get field 'all' because union is currently set to " + getFieldDesc(getSetField()).name); } }
public NullStruct get_direct() { if (getSetField() == _Fields.DIRECT) { return (NullStruct)getFieldValue(); } else { throw new java.lang.RuntimeException("Cannot get field 'direct' because union is currently set to " + getFieldDesc(getSetField()).name); } }
public java.util.List<java.lang.String> get_fields() { if (getSetField() == _Fields.FIELDS) { return (java.util.List<java.lang.String>)getFieldValue(); } else { throw new java.lang.RuntimeException("Cannot get field 'fields' because union is currently set to " + getFieldDesc(getSetField()).name); } }
public NullStruct get_none() { if (getSetField() == _Fields.NONE) { return (NullStruct)getFieldValue(); } else { throw new java.lang.RuntimeException("Cannot get field 'none' because union is currently set to " + getFieldDesc(getSetField()).name); } }
public NullStruct get_local_or_shuffle() { if (getSetField() == _Fields.LOCAL_OR_SHUFFLE) { return (NullStruct)getFieldValue(); } else { throw new java.lang.RuntimeException("Cannot get field 'local_or_shuffle' because union is currently set to " + getFieldDesc(getSetField()).name); } }
public JavaObject get_custom_object() { if (getSetField() == _Fields.CUSTOM_OBJECT) { return (JavaObject)getFieldValue(); } else { throw new java.lang.RuntimeException("Cannot get field 'custom_object' because union is currently set to " + getFieldDesc(getSetField()).name); } }
public boolean equals(Grouping other) { return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue()); }
public java.nio.ByteBuffer buffer_for_custom_serialized() { if (getSetField() == _Fields.CUSTOM_SERIALIZED) { return org.apache.storm.thrift.TBaseHelper.copyBinary((java.nio.ByteBuffer)getFieldValue()); } else { throw new java.lang.RuntimeException("Cannot get field 'custom_serialized' because union is currently set to " + getFieldDesc(getSetField()).name); } }
/** * getInputMap. * @param entryInput entryInput * @return getInputMap */ public static Map<String, Object> getInputMap(Map.Entry<GlobalStreamId,Grouping> entryInput) { Map<String, Object> result = new HashMap(); result.put(":component", entryInput.getKey().get_componentId()); result.put(":stream", entryInput.getKey().get_streamId()); result.put(":sani-stream", sanitizeStreamName(entryInput.getKey().get_streamId())); result.put(":grouping", entryInput.getValue().getSetField().getFieldName()); return result; }
private static Map<String, Object> groupingToJSONableMap(Grouping grouping) { Map<String, Object> groupingMap = new HashMap<>(); groupingMap.put("type", grouping.getSetField().toString()); if (grouping.is_set_fields()) { groupingMap.put("fields", grouping.get_fields()); } return groupingMap; }
@Override public int hashCode() { java.util.List<java.lang.Object> list = new java.util.ArrayList<java.lang.Object>(); list.add(this.getClass().getName()); org.apache.storm.thrift.TFieldIdEnum setField = getSetField(); if (setField != null) { list.add(setField.getThriftFieldId()); java.lang.Object value = getFieldValue(); if (value instanceof org.apache.storm.thrift.TEnum) { list.add(((org.apache.storm.thrift.TEnum)getFieldValue()).getValue()); } else { list.add(value); } } return list.hashCode(); } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@Override public int compareTo(Grouping other) { int lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField()); if (lastComparison == 0) { return org.apache.storm.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue()); } return lastComparison; }
public Builder withGroupingType(Grouping grouping) { GroupingType group = GroupingType.SHUFFLE; Grouping._Fields thriftType = grouping.getSetField();
public NullStruct get_shuffle() { if (getSetField() == _Fields.SHUFFLE) { return (NullStruct)getFieldValue(); } else { throw new RuntimeException("Cannot get field 'shuffle' because union is currently set to " + getFieldDesc(getSetField()).name); } }
public NullStruct get_none() { if (getSetField() == _Fields.NONE) { return (NullStruct)getFieldValue(); } else { throw new RuntimeException("Cannot get field 'none' because union is currently set to " + getFieldDesc(getSetField()).name); } }
public JavaObject get_custom_object() { if (getSetField() == _Fields.CUSTOM_OBJECT) { return (JavaObject)getFieldValue(); } else { throw new RuntimeException("Cannot get field 'custom_object' because union is currently set to " + getFieldDesc(getSetField()).name); } }
public NullStruct get_local_or_shuffle() { if (getSetField() == _Fields.LOCAL_OR_SHUFFLE) { return (NullStruct)getFieldValue(); } else { throw new RuntimeException("Cannot get field 'local_or_shuffle' because union is currently set to " + getFieldDesc(getSetField()).name); } }
public List<String> get_fields() { if (getSetField() == _Fields.FIELDS) { return (List<String>)getFieldValue(); } else { throw new RuntimeException("Cannot get field 'fields' because union is currently set to " + getFieldDesc(getSetField()).name); } }