Search in sources :

Example 1 with BackupOperation

use of com.hazelcast.spi.impl.operationservice.BackupOperation in project hazelcast by hazelcast.

the class MapOperation method logError.

@Override
public void logError(Throwable e) {
    ILogger logger = getLogger();
    if (e instanceof NativeOutOfMemoryError) {
        Level level = this instanceof BackupOperation ? Level.FINEST : Level.WARNING;
        logger.log(level, "Cannot complete operation! -> " + e.getMessage());
    } else {
        // we need to introduce a proper method to handle operation failures (at the moment
        // this is the only place where we can dispose native memory allocations on failure)
        disposeDeferredBlocks();
        super.logError(e);
    }
}
Also used : NativeOutOfMemoryError(com.hazelcast.memory.NativeOutOfMemoryError) ILogger(com.hazelcast.logging.ILogger) Level(java.util.logging.Level) BackupOperation(com.hazelcast.spi.impl.operationservice.BackupOperation)

Aggregations

ILogger (com.hazelcast.logging.ILogger)1 NativeOutOfMemoryError (com.hazelcast.memory.NativeOutOfMemoryError)1 BackupOperation (com.hazelcast.spi.impl.operationservice.BackupOperation)1 Level (java.util.logging.Level)1