git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-publishing/document-store-lib@141745 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
f3bb13279e
commit
eee48e69ca
|
@ -77,6 +77,12 @@ public class FallbackPersistenceBackend extends PersistenceBackend {
|
|||
// Nothing TO DO
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void disconnect() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -90,19 +90,22 @@ public abstract class PersistenceBackend {
|
|||
protected abstract void prepareConnection(PersistenceBackendConfiguration configuration) throws Exception;
|
||||
|
||||
/**
|
||||
* This method is for open connection
|
||||
* This method is for open db connection
|
||||
* @throws Exception
|
||||
*/
|
||||
protected abstract void openConnection() throws Exception ;
|
||||
|
||||
|
||||
/**
|
||||
* This method is for disconnect
|
||||
* This method is for close db connection
|
||||
* @throws Exception
|
||||
*/
|
||||
protected void disconnect() throws Exception {
|
||||
//NOTHING
|
||||
};
|
||||
protected abstract void close() throws Exception;
|
||||
|
||||
/**
|
||||
* This method is for close db and disconnect from cluster
|
||||
* @throws Exception
|
||||
*/
|
||||
protected abstract void disconnect() throws Exception ;
|
||||
|
||||
/**
|
||||
* This method contains the code to save the {@link Record}
|
||||
|
@ -130,7 +133,7 @@ public abstract class PersistenceBackend {
|
|||
fallbackPersistence.reallyAccount(record);
|
||||
logger.trace("accountWithFallback for timeout, now:{} and timerToFallback:{}", now,timerToFallback );
|
||||
if ((now - timerToFallback) > MAX_TIME_TO_FALLBACK){
|
||||
logger.error("accountWithFallback MAX_TIME_TO_FALLBACK is conclused");
|
||||
logger.debug("accountWithFallback MAX_TIME_TO_FALLBACK is conclused");
|
||||
timeoutFallback=false;
|
||||
timerToFallback=0;
|
||||
}
|
||||
|
@ -237,7 +240,7 @@ public abstract class PersistenceBackend {
|
|||
this.closed = false;
|
||||
}
|
||||
|
||||
public abstract void close() throws Exception;
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue