Commit 4052e5a6 authored by Andre Freyssinet's avatar Andre Freyssinet

Adds loadAll method (Joram-362).

parent ced26860
......@@ -25,7 +25,7 @@ package fr.dyade.aaa.util;
import java.io.IOException;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
* The Transaction interface defines the API of the atomic storage component.
......@@ -142,12 +142,19 @@ public interface Transaction {
String[] getList(String prefix);
/**
* Fills the list with all objects of the component whose name begins with the prefix.
* Returns true if this Transaction implementation implements an optimized loadAll method.
*
* @return true if this Transaction implementation implements an optimized loadAll method.
*/
boolean useLoadAll();
/**
* Fills the map with all objects of the component whose name begins with the prefix.
*
* @param prefix The prefix of searched objects.
* @param list The list of corresponding objects.
* @param map The map of corresponding objects.
*/
void loadAll(String prefix, List list);
void loadAll(String prefix, Map map);
/**
* Returns true if the component is persistent.
......
/*
* Copyright (C) 2005 - 2019 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): ScalAgent Distributed Technologies
* Contributor(s):
*/
package fr.dyade.aaa.util;
public interface TransactionMBean {
/**
* Tests if the Transaction component is persistent.
*
* @return true if the component is persistent; false otherwise.
*/
boolean isPersistent();
/**
* Returns the transaction state.
* @return the transaction state.
*/
public int getPhase();
/**
* Returns a string representation of the transaction state.
* @return the string representation of the transaction state.
*/
public String getPhaseInfo();
/**
* Returns the number of commit operation since startup.
*
* @return The number of commit operation.
*/
public int getCommitCount();
/**
* Returns the starting time.
*
* @return The starting time.
*/
public long getStartTime();
}
/*
* Copyright (C) 2005 - 2020 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): ScalAgent Distributed Technologies
* Contributor(s):
*/
package fr.dyade.aaa.util;
public interface TransactionMBean {
/**
* Tests if the Transaction component is persistent.
*
* @return true if the component is persistent; false otherwise.
*/
boolean isPersistent();
/**
* Returns true if this Transaction implementation implements an optimized loadAll method.
*
* @return true if this Transaction implementation implements an optimized loadAll method.
*/
boolean useLoadAll();
/**
* Returns the transaction state.
* @return the transaction state.
*/
public int getPhase();
/**
* Returns a string representation of the transaction state.
* @return the string representation of the transaction state.
*/
public String getPhaseInfo();
/**
* Returns the number of commit operation since startup.
*
* @return The number of commit operation.
*/
public int getCommitCount();
/**
* Returns the starting time.
*
* @return The starting time.
*/
public long getStartTime();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment