if some one uses the TxFileContentStore and the JDBCStore for the meta data?
And there for, makes it sense to implement MacroStore in the LucenePropertiesIndexer? At least MacroDelete could be supported there.
Oliver Zeigermann wrote:
If we have to iterate over the whole subtree to check permissions and locks, than we could check that all nodes are in the same store too. We can use source.getStore()==target.getStore() as a first guess, and assure it while iterating?I am still struggeling how to check if all resources recursively moved/deleted/copied are in the same store. I will try and check Stefan's implementation.
I am a bit more worried about security and locking. I have omitted any checks for now, but if I did it right I would have to check all resources to be moved/copied/deleted for appropritate rights and if there are locks on them, eating most of the performance gain I am afraid :(
Any ideas?
By the way, I have the WCK file reference implementation running as a MacroStore and moving/copying/deleting now is just as fast in the file system. Nice :)
Caching issues hopefully are resolved by invalidating entries resursively. However, this relies on correct checking of the scopes as well as described above.
Oliver
On Fri, 15 Oct 2004 14:58:04 +0200, Oliver Zeigermann <[EMAIL PROTECTED]> wrote:
Folks,
I have done some work for the MacroStore I was talking about earlier. I found out I will have to invalidate caches *recursively* as well when I delete something on the store level. I understand removeObjectFromCache already does this for me, right?
I will attach the interface proposal for the MacroStore. What do you think?
Oliver
/* * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/store/SequenceStore.java,v 1.3 2004/07/28 09:34:40 ib Exp $ * $Revision: 1.3 $ * $Date: 2004/07/28 09:34:40 $ * * ==================================================================== * * Copyright 2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */
package org.apache.slide.store;
import org.apache.slide.common.Service; import org.apache.slide.common.ServiceAccessException; import org.apache.slide.common.Uri; import org.apache.slide.macro.CopyMacroException; import org.apache.slide.macro.DeleteMacroException; import org.apache.slide.structure.ObjectAlreadyExistsException; import org.apache.slide.structure.ObjectNotFoundException;
/** * Store for macro opertations support. This store executes compound operations * on hierarchical data. A recursive copy, a recursive delete and a recursive * move resp. rename are supported provided the [EMAIL PROTECTED] #isMacroCopySupported()}, * [EMAIL PROTECTED] #isMacroMoveSupported()}and/or [EMAIL PROTECTED] #isMacroDeleteSupported()} * indicate this. By having checks for all three macro opertations stores can * dynamically decide which kind of operations they support. E.g. This allows * for stores that only support recursive deletes. * * @version $Revision: 1.3 $ */ public interface MacroStore extends Service {
/** * Checks if this store instance actually supports macro delete operation. * It may seem clear this store supports sequences as it implements this * interface, but a request to the underlying persistence store might be * needed to dynamically find out. * * @return <code>true</code> if the store supports the macro delete * operation, <code>false</code> otherwise */ public boolean isMacroDeleteSupported();
/** * Deletes an object recursively. * * @param targetUri * Uri of the object to delete * @throws ObjectNotFoundException if the object to delete was not found * @throws ServiceAccessException * if anything else goes wrong while deleting the object */ public void marcoDelete(Uri targetUri) throws ServiceAccessException, ObjectNotFoundException;
/** * Checks if this store instance actually supports macro copy operation. It * may seem clear this store supports sequences as it implements this * interface, but a request to the underlying persistence store might be * needed to dynamically find out. * * @return <code>true</code> if the store supports the macro copy * operation, <code>false</code> otherwise */ public boolean isMacroCopySupported();
/** * Recursively copies an object. * * @param sourceUri the source URI of the copy * @param targetUri the destination URI of the copy * @throws ObjectNotFoundException if the object to copy from was not found * @throws ObjectAlreadyExistsException if the object to copy to to was already there * @throws ServiceAccessException * if anything else goes wrong while copying the object */ public void marcoCopy(Uri sourceUri, Uri targetUri) throws ServiceAccessException, ObjectNotFoundException, ObjectAlreadyExistsException;
/** * Checks if this store instance actually supports macro move operation. It * may seem clear this store supports sequences as it implements this * interface, but a request to the underlying persistence store might be * needed to dynamically find out. * * @return <code>true</code> if the store supports the macro move * operation, <code>false</code> otherwise */ public boolean isMacroMoveSupported();
/** * Recursively moves an object. * * @param sourceUri the source URI of the move * @param targetUri the destination URI of the move * @throws ObjectNotFoundException if the object to move from was not found * @throws ObjectAlreadyExistsException if the object to move to to was already there * @throws ServiceAccessException * if anything else goes wrong while moving the object */ public void marcoMove(Uri sourceUri, Uri targetUri) throws ServiceAccessException, ObjectNotFoundException, ObjectAlreadyExistsException;
}
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
