@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((is_set_acl()) ? 131071 : 524287); if (is_set_acl()) hashCode = hashCode * 8191 + acl.hashCode(); hashCode = hashCode * 8191 + ((is_set_replication_factor()) ? 131071 : 524287); if (is_set_replication_factor()) hashCode = hashCode * 8191 + replication_factor; return hashCode; }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case ACL: return is_set_acl(); case REPLICATION_FACTOR: return is_set_replication_factor(); } throw new java.lang.IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public SettableBlobMeta(SettableBlobMeta other) { __isset_bitfield = other.__isset_bitfield; if (other.is_set_acl()) { java.util.List<AccessControl> __this__acl = new java.util.ArrayList<AccessControl>(other.acl.size()); for (AccessControl other_element : other.acl) { __this__acl.add(new AccessControl(other_element)); } this.acl = __this__acl; } this.replication_factor = other.replication_factor; }
public boolean equals(SettableBlobMeta that) { if (that == null) return false; if (this == that) return true; boolean this_present_acl = true && this.is_set_acl(); boolean that_present_acl = true && that.is_set_acl(); if (this_present_acl || that_present_acl) { if (!(this_present_acl && that_present_acl)) return false; if (!this.acl.equals(that.acl)) return false; } boolean this_present_replication_factor = true && this.is_set_replication_factor(); boolean that_present_replication_factor = true && that.is_set_replication_factor(); if (this_present_replication_factor || that_present_replication_factor) { if (!(this_present_replication_factor && that_present_replication_factor)) return false; if (this.replication_factor != that.replication_factor) return false; } return true; }
public void validate() throws org.apache.storm.thrift.TException { // check for required fields if (!is_set_acl()) { throw new org.apache.storm.thrift.protocol.TProtocolException("Required field 'acl' is unset! Struct:" + toString()); } // check for sub-struct validity }
@Override public int compareTo(SettableBlobMeta other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.valueOf(is_set_acl()).compareTo(other.is_set_acl()); if (lastComparison != 0) { return lastComparison; } if (is_set_acl()) { lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.acl, other.acl); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.valueOf(is_set_replication_factor()).compareTo(other.is_set_replication_factor()); if (lastComparison != 0) { return lastComparison; } if (is_set_replication_factor()) { lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.replication_factor, other.replication_factor); if (lastComparison != 0) { return lastComparison; } } return 0; }
/** * Client facing API to set the metadata for a blob. * * @param key blob key name. * @param meta contains ACL information. * @throws AuthorizationException * @throws KeyNotFoundException */ public final void setBlobMeta(String key, SettableBlobMeta meta) throws AuthorizationException, KeyNotFoundException { if (meta != null && meta.is_set_acl()) { BlobStoreAclHandler.validateSettableACLs(key, meta.get_acl()); } setBlobMetaToExtend(key, meta); }
/** * Client facing API to create a blob. * * @param key blob key name. * @param meta contains ACL information. * @return AtomicOutputStream returns an output stream into which data can be written. * * @throws AuthorizationException * @throws KeyAlreadyExistsException */ public final AtomicOutputStream createBlob(String key, SettableBlobMeta meta) throws AuthorizationException, KeyAlreadyExistsException { if (meta != null && meta.is_set_acl()) { BlobStoreAclHandler.validateSettableACLs(key, meta.get_acl()); } return createBlobToExtend(key, meta); }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case ACL: return is_set_acl(); case REPLICATION_FACTOR: return is_set_replication_factor(); } throw new IllegalStateException(); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_acl = true && (is_set_acl()); list.add(present_acl); if (present_acl) list.add(acl); boolean present_replication_factor = true && (is_set_replication_factor()); list.add(present_replication_factor); if (present_replication_factor) list.add(replication_factor); return list.hashCode(); }
/** * Performs a deep copy on <i>other</i>. */ public SettableBlobMeta(SettableBlobMeta other) { __isset_bitfield = other.__isset_bitfield; if (other.is_set_acl()) { List<AccessControl> __this__acl = new ArrayList<AccessControl>(other.acl.size()); for (AccessControl other_element : other.acl) { __this__acl.add(new AccessControl(other_element)); } this.acl = __this__acl; } this.replication_factor = other.replication_factor; }
public boolean equals(SettableBlobMeta that) { if (that == null) return false; boolean this_present_acl = true && this.is_set_acl(); boolean that_present_acl = true && that.is_set_acl(); if (this_present_acl || that_present_acl) { if (!(this_present_acl && that_present_acl)) return false; if (!this.acl.equals(that.acl)) return false; } boolean this_present_replication_factor = true && this.is_set_replication_factor(); boolean that_present_replication_factor = true && that.is_set_replication_factor(); if (this_present_replication_factor || that_present_replication_factor) { if (!(this_present_replication_factor && that_present_replication_factor)) return false; if (this.replication_factor != that.replication_factor) return false; } return true; }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_acl()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'acl' is unset! Struct:" + toString()); } // check for sub-struct validity }
@Override public int compareTo(SettableBlobMeta other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_acl()).compareTo(other.is_set_acl()); if (lastComparison != 0) { return lastComparison; } if (is_set_acl()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.acl, other.acl); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_replication_factor()).compareTo(other.is_set_replication_factor()); if (lastComparison != 0) { return lastComparison; } if (is_set_replication_factor()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.replication_factor, other.replication_factor); if (lastComparison != 0) { return lastComparison; } } return 0; }
/** * Client facing API to set the metadata for a blob. * @param key blob key name. * @param meta contains ACL information. * @throws AuthorizationException * @throws KeyNotFoundException */ public final void setBlobMeta(String key, SettableBlobMeta meta) throws AuthorizationException, KeyNotFoundException { if (meta !=null && meta.is_set_acl()) { BlobStoreAclHandler.validateSettableACLs(key, meta.get_acl()); } setBlobMetaToExtend(key, meta); }
/** * Client facing API to create a blob. * @param key blob key name. * @param meta contains ACL information. * @return AtomicOutputStream returns an output stream into which data can be written. * @throws AuthorizationException * @throws KeyAlreadyExistsException */ public final AtomicOutputStream createBlob(String key, SettableBlobMeta meta) throws AuthorizationException, KeyAlreadyExistsException { if (meta !=null && meta.is_set_acl()) { BlobStoreAclHandler.validateSettableACLs(key, meta.get_acl()); } return createBlobToExtend(key, meta); }