This commit is contained in:
Alessandro Pieve 2017-01-24 16:59:18 +00:00
parent f3bb13279e
commit eee48e69ca
2 changed files with 17 additions and 8 deletions

View File

@ -77,6 +77,12 @@ public class FallbackPersistenceBackend extends PersistenceBackend {
// Nothing TO DO
}
@Override
protected void disconnect() throws Exception {
// TODO Auto-generated method stub
}
}

View File

@ -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;