public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
public Builder mergeFrom(alluxio.grpc.FileSystemMasterCommonPOptions other) { if (other == alluxio.grpc.FileSystemMasterCommonPOptions.getDefaultInstance()) return this; if (other.hasSyncIntervalMs()) { setSyncIntervalMs(other.getSyncIntervalMs()); } if (other.hasTtl()) { setTtl(other.getTtl()); } if (other.hasTtlAction()) { setTtlAction(other.getTtlAction()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof alluxio.grpc.FileSystemMasterCommonPOptions)) { return super.equals(obj); } alluxio.grpc.FileSystemMasterCommonPOptions other = (alluxio.grpc.FileSystemMasterCommonPOptions) obj; boolean result = true; result = result && (hasSyncIntervalMs() == other.hasSyncIntervalMs()); if (hasSyncIntervalMs()) { result = result && (getSyncIntervalMs() == other.getSyncIntervalMs()); } result = result && (hasTtl() == other.hasTtl()); if (hasTtl()) { result = result && (getTtl() == other.getTtl()); } result = result && (hasTtlAction() == other.hasTtlAction()); if (hasTtlAction()) { result = result && ttlAction_ == other.ttlAction_; } result = result && unknownFields.equals(other.unknownFields); return result; }
/** * <code>optional .alluxio.grpc.file.FileSystemMasterCommonPOptions commonOptions = 2;</code> */ public Builder mergeCommonOptions(alluxio.grpc.FileSystemMasterCommonPOptions value) { if (commonOptionsBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002) && commonOptions_ != null && commonOptions_ != alluxio.grpc.FileSystemMasterCommonPOptions.getDefaultInstance()) { commonOptions_ = alluxio.grpc.FileSystemMasterCommonPOptions.newBuilder(commonOptions_).mergeFrom(value).buildPartial(); } else { commonOptions_ = value; } onChanged(); } else { commonOptionsBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /**
loadMetadataIfNotExist(rpcContext, inodePath, LoadMetadataContext.defaults(LoadMetadataPOptions.newBuilder().setCreateAncestors(true) .setCommonOptions(FileSystemMasterCommonPOptions.newBuilder() .setTtl(context.getOptions().getCommonOptions().getTtl()) .setTtlAction(context.getOptions().getCommonOptions().getTtlAction())))); ensureFullPathAndUpdateCache(inodePath);
/** * <code>optional .alluxio.grpc.file.FileSystemMasterCommonPOptions commonOptions = 1;</code> */ public alluxio.grpc.FileSystemMasterCommonPOptions getCommonOptions() { return commonOptions_ == null ? alluxio.grpc.FileSystemMasterCommonPOptions.getDefaultInstance() : commonOptions_; } /**
private void loadExtractedFields() { com.google.protobuf.GeneratedMessageV3.Builder<?> optionsBuilder = getOptions(); // Populate extracted fields from given options if (optionsBuilder instanceof CreateFilePOptions.Builder) { CreateFilePOptions.Builder fileOptions = (CreateFilePOptions.Builder) optionsBuilder; mMode = Mode.fromProto(fileOptions.getMode()); mRecursive = fileOptions.getRecursive(); mTtl = fileOptions.getCommonOptions().getTtl(); mTtlAction = fileOptions.getCommonOptions().getTtlAction(); } // Populate extracted fields from given options if (optionsBuilder instanceof CreateDirectoryPOptions.Builder) { CreateDirectoryPOptions.Builder dirOptions = (CreateDirectoryPOptions.Builder) optionsBuilder; mMode = Mode.fromProto(dirOptions.getMode()); mRecursive = dirOptions.getRecursive(); mTtl = dirOptions.getCommonOptions().getTtl(); mTtlAction = dirOptions.getCommonOptions().getTtlAction(); } }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof alluxio.grpc.StopSyncPOptions)) { return super.equals(obj); } alluxio.grpc.StopSyncPOptions other = (alluxio.grpc.StopSyncPOptions) obj; boolean result = true; result = result && (hasCommonOptions() == other.hasCommonOptions()); if (hasCommonOptions()) { result = result && getCommonOptions() .equals(other.getCommonOptions()); } result = result && unknownFields.equals(other.unknownFields); return result; }
private LockingScheme createLockingScheme(AlluxioURI path, FileSystemMasterCommonPOptions options, LockPattern desiredLockMode) { boolean shouldSync = mUfsSyncPathCache.shouldSyncPath(path.getPath(), options.getSyncIntervalMs()); return new LockingScheme(path, desiredLockMode, shouldSync); }
public alluxio.grpc.FileSystemMasterCommonPOptions buildPartial() { alluxio.grpc.FileSystemMasterCommonPOptions result = new alluxio.grpc.FileSystemMasterCommonPOptions(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.syncIntervalMs_ = syncIntervalMs_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.ttl_ = ttl_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.ttlAction_ = ttlAction_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
/** * <code>optional .alluxio.grpc.file.FileSystemMasterCommonPOptions commonOptions = 1;</code> */ public Builder mergeCommonOptions(alluxio.grpc.FileSystemMasterCommonPOptions value) { if (commonOptionsBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && commonOptions_ != null && commonOptions_ != alluxio.grpc.FileSystemMasterCommonPOptions.getDefaultInstance()) { commonOptions_ = alluxio.grpc.FileSystemMasterCommonPOptions.newBuilder(commonOptions_).mergeFrom(value).buildPartial(); } else { commonOptions_ = value; } onChanged(); } else { commonOptionsBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; return this; } /**
LoadMetadataContext.defaults(LoadMetadataPOptions.newBuilder().setCreateAncestors(true) .setLoadDescendantType(GrpcUtils.toProto(loadDescendantType)) .setCommonOptions(FileSystemMasterCommonPOptions.newBuilder() .setTtl(context.getOptions().getCommonOptions().getTtl()) .setTtlAction(context.getOptions().getCommonOptions().getTtlAction()))); Inode inode; if (inodePath.fullPathExists()) {
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasSyncIntervalMs()) { hash = (37 * hash) + SYNCINTERVALMS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getSyncIntervalMs()); } if (hasTtl()) { hash = (37 * hash) + TTL_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getTtl()); } if (hasTtlAction()) { hash = (37 * hash) + TTLACTION_FIELD_NUMBER; hash = (53 * hash) + ttlAction_; } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * <code>optional .alluxio.grpc.file.FileSystemMasterCommonPOptions commonOptions = 1;</code> */ public alluxio.grpc.FileSystemMasterCommonPOptionsOrBuilder getCommonOptionsOrBuilder() { return commonOptions_ == null ? alluxio.grpc.FileSystemMasterCommonPOptions.getDefaultInstance() : commonOptions_; }
.setReplicationMax(options.getReplicationMax()) .setReplicationMin(options.getReplicationMin()) .setTtl(options.getCommonOptions().getTtl()) .setTtlAction(options.getCommonOptions().getTtlAction()) .setParentId(parentId) .setLastModificationTimeMs(context.getOperationTimeMs(), true)
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof alluxio.grpc.UnmountPOptions)) { return super.equals(obj); } alluxio.grpc.UnmountPOptions other = (alluxio.grpc.UnmountPOptions) obj; boolean result = true; result = result && (hasCommonOptions() == other.hasCommonOptions()); if (hasCommonOptions()) { result = result && getCommonOptions() .equals(other.getCommonOptions()); } result = result && unknownFields.equals(other.unknownFields); return result; }
/** * <code>optional .alluxio.grpc.file.FileSystemMasterCommonPOptions commonOptions = 5;</code> */ public Builder mergeCommonOptions(alluxio.grpc.FileSystemMasterCommonPOptions value) { if (commonOptionsBuilder_ == null) { if (((bitField0_ & 0x00000010) == 0x00000010) && commonOptions_ != null && commonOptions_ != alluxio.grpc.FileSystemMasterCommonPOptions.getDefaultInstance()) { commonOptions_ = alluxio.grpc.FileSystemMasterCommonPOptions.newBuilder(commonOptions_).mergeFrom(value).buildPartial(); } else { commonOptions_ = value; } onChanged(); } else { commonOptionsBuilder_.mergeFrom(value); } bitField0_ |= 0x00000010; return this; } /**
createFileContext.getOptions().setRecursive(context.getOptions().getCreateAncestors()); createFileContext.getOptions() .setCommonOptions(FileSystemMasterCommonPOptions.newBuilder() .setTtl(context.getOptions().getCommonOptions().getTtl()) .setTtlAction(context.getOptions().getCommonOptions().getTtlAction())); createFileContext.setMetadataLoad(true); createFileContext.setOwner(context.getUfsStatus().getOwner());
/** * @return {@link FileSystemMasterCommonPOptions} with default values for master */ private static FileSystemMasterCommonPOptions commonDefaults() { return FileSystemMasterCommonPOptions.newBuilder() .setTtl(ServerConfiguration.getLong(PropertyKey.USER_FILE_CREATE_TTL)) .setTtlAction( ServerConfiguration.getEnum(PropertyKey.USER_FILE_CREATE_TTL_ACTION, TtlAction.class)) .setSyncIntervalMs(ServerConfiguration.getMs(PropertyKey.USER_FILE_METADATA_SYNC_INTERVAL)) .build(); }
/** * <code>optional .alluxio.grpc.file.FileSystemMasterCommonPOptions commonOptions = 1;</code> */ public alluxio.grpc.FileSystemMasterCommonPOptionsOrBuilder getCommonOptionsOrBuilder() { return commonOptions_ == null ? alluxio.grpc.FileSystemMasterCommonPOptions.getDefaultInstance() : commonOptions_; }