@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof EncryptionZoneInt)) { return false; } EncryptionZoneInt b = (EncryptionZoneInt)o; return new EqualsBuilder() .append(inodeId, b.getINodeId()) .append(suite, b.getSuite()) .append(version, b.getVersion()) .append(keyName, b.getKeyName()) .isEquals(); }
/** * @return a list of all key names. */ String[] getKeyNames() { assert dir.hasReadLock(); if (!hasCreatedEncryptionZone()) { return new String[0]; } String[] ret = new String[encryptionZones.size()]; int index = 0; for (Map.Entry<Long, EncryptionZoneInt> entry : encryptionZones .entrySet()) { ret[index++] = entry.getValue().getKeyName(); } return ret; } }
ezi.getSuite(), ezi.getVersion(), ezi.getKeyName())); count++; if (count >= numResponses) {
ezi.getSuite(), ezi.getVersion(), ezi.getKeyName())); count++; if (count >= numResponses) {
ezi.getSuite(), ezi.getVersion(), ezi.getKeyName())); count++; if (count >= numResponses) {
/** * Returns an EncryptionZone representing the ez for a given path. * Returns an empty marker EncryptionZone if path is not in an ez. * * @param iip The INodesInPath of the path to check * @return the EncryptionZone representing the ez for the path. */ EncryptionZone getEZINodeForPath(INodesInPath iip) { final EncryptionZoneInt ezi = getEncryptionZoneForPath(iip); if (ezi == null) { return null; } else { return new EncryptionZone(ezi.getINodeId(), getFullPathName(ezi), ezi.getSuite(), ezi.getVersion(), ezi.getKeyName()); } }
/** * Returns an EncryptionZone representing the ez for a given path. * Returns an empty marker EncryptionZone if path is not in an ez. * * @param iip The INodesInPath of the path to check * @return the EncryptionZone representing the ez for the path. */ EncryptionZone getEZINodeForPath(INodesInPath iip) { final EncryptionZoneInt ezi = getEncryptionZoneForPath(iip); if (ezi == null) { return null; } else { return new EncryptionZone(ezi.getINodeId(), getFullPathName(ezi), ezi.getSuite(), ezi.getVersion(), ezi.getKeyName()); } }
/** * Get the key name for an encryption zone. Returns null if <tt>iip</tt> is * not within an encryption zone. * <p/> * Called while holding the FSDirectory lock. */ String getKeyName(final INodesInPath iip) { assert dir.hasReadLock(); EncryptionZoneInt ezi = getEncryptionZoneForPath(iip); if (ezi == null) { return null; } return ezi.getKeyName(); }
/** * Get the key name for an encryption zone. Returns null if <tt>iip</tt> is * not within an encryption zone. * <p/> * Called while holding the FSDirectory lock. */ String getKeyName(final INodesInPath iip) { assert dir.hasReadLock(); EncryptionZoneInt ezi = getEncryptionZoneForPath(iip); if (ezi == null) { return null; } return ezi.getKeyName(); }
/** * Returns an EncryptionZone representing the ez for a given path. * Returns an empty marker EncryptionZone if path is not in an ez. * * @param iip The INodesInPath of the path to check * @return the EncryptionZone representing the ez for the path. */ EncryptionZone getEZINodeForPath(INodesInPath iip) throws IOException { final EncryptionZoneInt ezi = getEncryptionZoneForPath(iip); if (ezi == null) { return null; } else { return new EncryptionZone(ezi.getINodeId(), getFullPathName(ezi.getINodeId()), ezi.getSuite(), ezi.getVersion(), ezi.getKeyName()); } }
/** * Get the key name for an encryption zone. Returns null if <tt>iip</tt> is * not within an encryption zone. * <p/> * Called while holding the FSDirectory lock. */ String getKeyName(final INodesInPath iip) throws IOException { assert dir.hasReadLock(); EncryptionZoneInt ezi = getEncryptionZoneForPath(iip); if (ezi == null) { return null; } return ezi.getKeyName(); }