public boolean deleteAttributes( final RepositoryItemUid uid ) { final RepositoryItemUidLock uidLock = uid.getAttributeLock(); uidLock.lock( Action.delete ); try { if ( getLogger().isDebugEnabled() ) { getLogger().debug( "Deleting attributes on UID=" + uid.toString() ); } boolean result = false; try { File ftarget = getFileFromBase( uid ); result = ftarget.exists() && ftarget.isFile() && ftarget.delete(); } catch ( IOException e ) { getLogger().warn( "Got IOException during delete of UID=" + uid.toString(), e ); } return result; } finally { uidLock.unlock(); } }
public Attributes getAttributes( final RepositoryItemUid uid ) throws IOException { final RepositoryItemUidLock uidLock = uid.getAttributeLock(); uidLock.lock( Action.read ); try { if ( getLogger().isDebugEnabled() ) { getLogger().debug( "Loading attributes on UID=" + uid.toString() ); } return doGetAttributes( uid ); } finally { uidLock.unlock(); } }
final RepositoryItemUidLock uidLock = uid.getAttributeLock();
public Attributes getAttributes( final RepositoryItemUid uid ) { final RepositoryItemUidLock uidLock = uid.getAttributeLock(); uidLock.lock( Action.read ); try { if ( getLogger().isDebugEnabled() ) { getLogger().debug( "Loading attributes on UID=" + uid.toString() ); } try { return doGetAttributes( uid ); } catch ( IOException ex ) { getLogger().error( "Got IOException during reading of UID=" + uid.toString(), ex ); return null; } } finally { uidLock.unlock(); } }
@Override public Attributes getAttributes( final RepositoryItemUid uid ) throws IOException { final RepositoryItemUidLock uidLock = uid.getAttributeLock(); uidLock.lock( Action.read ); try { Attributes result = mainAttributeStorage.getAttributes( uid ); if ( result == null && fallbackAttributeStorage != null ) { result = fallbackAttributeStorage.getAttributes( uid ); if ( result != null ) { // mark it as legacy result.put( FALLBACK_MARKER_KEY, Boolean.TRUE.toString() ); } } return result; } finally { uidLock.unlock(); } }
final RepositoryItemUidLock uidLock = uid.getAttributeLock();
throws IOException final RepositoryItemUidLock uidLock = uid.getAttributeLock();
public void putAttributes( final RepositoryItemUid uid, Attributes attributes ) final RepositoryItemUidLock uidLock = uid.getAttributeLock();
public boolean deleteAttributes( final RepositoryItemUid uid ) throws IOException final RepositoryItemUidLock uidLock = uid.getAttributeLock();
throws IOException final RepositoryItemUidLock uidLock = uid.getAttributeLock();
public void putAttributes( final RepositoryItemUid uid, Attributes attributes ) throws IOException final RepositoryItemUidLock uidLock = uid.getAttributeLock();