SnapshotCopy(byte[] name, PermissionStatus permissions, AclFeature aclFeature, long modificationTime, long accessTime, XAttrFeature xAttrFeature) { this.name = name; this.permission = PermissionStatusFormat.toLong(permissions); if (aclFeature != null) { aclFeature = AclStorage.addAclFeature(aclFeature); } this.aclFeature = aclFeature; this.modificationTime = modificationTime; this.accessTime = accessTime; this.xAttrFeature = xAttrFeature; }
public void addAclFeature(AclFeature f) { AclFeature f1 = getAclFeature(); if (f1 != null) throw new IllegalStateException("Duplicated ACLFeature"); addFeature(AclStorage.addAclFeature(f)); }
/** * Copy constructor * @param other The INodeDirectory to be copied * @param adopt Indicate whether or not need to set the parent field of child * INodes to the new node * @param featuresToCopy any number of features to copy to the new node. * The method will do a reference copy, not a deep copy. */ public INodeDirectory(INodeDirectory other, boolean adopt, Feature... featuresToCopy) { super(other); this.children = other.children; if (adopt && this.children != null) { for (INode child : children) { child.setParent(this); } } this.features = featuresToCopy; AclFeature aclFeature = getFeature(AclFeature.class); if (aclFeature != null) { // for the de-duplication of AclFeature removeFeature(aclFeature); addFeature(AclStorage.addAclFeature(aclFeature)); } }
SnapshotCopy(INode inode) { this.name = inode.getLocalNameBytes(); this.permission = inode.getPermissionLong(); if (inode.getAclFeature() != null) { aclFeature = AclStorage.addAclFeature(inode.getAclFeature()); } else { aclFeature = null; } this.modificationTime = inode.getModificationTime(); this.accessTime = inode.getAccessTime(); this.xAttrFeature = inode.getXAttrFeature(); }
SnapshotCopy(byte[] name, PermissionStatus permissions, AclFeature aclFeature, long modificationTime, long accessTime, XAttrFeature xAttrFeature) { this.name = name; this.permission = PermissionStatusFormat.toLong(permissions); if (aclFeature != null) { aclFeature = AclStorage.addAclFeature(aclFeature); } this.aclFeature = aclFeature; this.modificationTime = modificationTime; this.accessTime = accessTime; this.xAttrFeature = xAttrFeature; }
SnapshotCopy(byte[] name, PermissionStatus permissions, AclFeature aclFeature, long modificationTime, long accessTime, XAttrFeature xAttrFeature) { this.name = name; this.permission = PermissionStatusFormat.toLong(permissions); if (aclFeature != null) { aclFeature = AclStorage.addAclFeature(aclFeature); } this.aclFeature = aclFeature; this.modificationTime = modificationTime; this.accessTime = accessTime; this.xAttrFeature = xAttrFeature; }
public void addAclFeature(AclFeature f) { AclFeature f1 = getAclFeature(); if (f1 != null) throw new IllegalStateException("Duplicated ACLFeature"); addFeature(AclStorage.addAclFeature(f)); }
public void addAclFeature(AclFeature f) { AclFeature f1 = getAclFeature(); if (f1 != null) throw new IllegalStateException("Duplicated ACLFeature"); addFeature(AclStorage.addAclFeature(f)); }
/** * Copy constructor * @param other The INodeDirectory to be copied * @param adopt Indicate whether or not need to set the parent field of child * INodes to the new node * @param featuresToCopy any number of features to copy to the new node. * The method will do a reference copy, not a deep copy. */ public INodeDirectory(INodeDirectory other, boolean adopt, Feature... featuresToCopy) { super(other); this.children = other.children; if (adopt && this.children != null) { for (INode child : children) { child.setParent(this); } } this.features = featuresToCopy; AclFeature aclFeature = getFeature(AclFeature.class); if (aclFeature != null) { // for the de-duplication of AclFeature removeFeature(aclFeature); addFeature(AclStorage.addAclFeature(aclFeature)); } }
/** * Copy constructor * @param other The INodeDirectory to be copied * @param adopt Indicate whether or not need to set the parent field of child * INodes to the new node * @param featuresToCopy any number of features to copy to the new node. * The method will do a reference copy, not a deep copy. */ public INodeDirectory(INodeDirectory other, boolean adopt, Feature... featuresToCopy) { super(other); this.children = other.children; if (adopt && this.children != null) { for (INode child : children) { child.setParent(this); } } this.features = featuresToCopy; AclFeature aclFeature = getFeature(AclFeature.class); if (aclFeature != null) { // for the de-duplication of AclFeature removeFeature(aclFeature); addFeature(AclStorage.addAclFeature(aclFeature)); } }
SnapshotCopy(INode inode) { this.name = inode.getLocalNameBytes(); this.permission = inode.getPermissionLong(); if (inode.getAclFeature() != null) { aclFeature = AclStorage.addAclFeature(inode.getAclFeature()); } else { aclFeature = null; } this.modificationTime = inode.getModificationTime(); this.accessTime = inode.getAccessTime(); this.xAttrFeature = inode.getXAttrFeature(); }
SnapshotCopy(INode inode) { this.name = inode.getLocalNameBytes(); this.permission = inode.getPermissionLong(); if (inode.getAclFeature() != null) { aclFeature = AclStorage.addAclFeature(inode.getAclFeature()); } else { aclFeature = null; } this.modificationTime = inode.getModificationTime(); this.accessTime = inode.getAccessTime(); this.xAttrFeature = inode.getXAttrFeature(); }