@Override public void onExecutionFailure(Throwable e) { // Execution failed so we should enable `returnsResponse` flag to prevent waiting anymore returnsResponse = true; super.onExecutionFailure(e); }
@Override protected void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); message = in.readData(); } }
@Override protected void writeInternal(ObjectDataOutput out) throws IOException { super.writeInternal(out); out.writeUTF(simpleName); }
@Override public void beforeRun() throws Exception { super.beforeRun(); namespace = CacheService.getObjectNamespace(name); final CacheService service = getService(); if (!service.getEventJournal().hasEventJournal(namespace)) { throw new UnsupportedOperationException( "Cannot subscribe to event journal because it is either not configured or disabled for cache " + name); } }
@Override public ExceptionAction onInvocationException(Throwable throwable) { if (throwable instanceof CacheNotExistsException) { ICacheService cacheService = getService(); if (cacheService.getCacheConfig(name) != null) { getLogger().finest("Retry Cache Operation from node " + getNodeEngine().getLocalMember()); return ExceptionAction.RETRY_INVOCATION; } } return super.onInvocationException(throwable); }
@Override public void logError(Throwable e) { if (e instanceof CacheNotExistsException) { // since this exception can be thrown and will be retried, we don't want to log this exception under server, // to reduce the logging noise ILogger logger = getLogger(); if (logger.isFinestEnabled()) { logger.finest("failed to execute: " + this, e); } return; } super.logError(e); }
@Override public void beforeRun() throws Exception { super.beforeRun(); namespace = CacheService.getObjectNamespace(name); final CacheService service = getService(); if (!service.getEventJournal().hasEventJournal(namespace)) { throw new UnsupportedOperationException( "Cannot subscribe to event journal because it is either not configured or disabled for cache " + name); } }
@Override public ExceptionAction onInvocationException(Throwable throwable) { if (throwable instanceof CacheNotExistsException) { ICacheService cacheService = getService(); if (cacheService.getCacheConfig(name) != null) { getLogger().finest("Retry Cache Operation from node " + getNodeEngine().getLocalMember()); return ExceptionAction.RETRY_INVOCATION; } } return super.onInvocationException(throwable); }
@Override public void logError(Throwable e) { if (e instanceof CacheNotExistsException) { // since this exception can be thrown and will be retried, we don't want to log this exception under server, // to reduce the logging noise ILogger logger = getLogger(); if (logger.isFinestEnabled()) { logger.finest("failed to execute: " + this, e); } return; } super.logError(e); }
@Override protected void writeInternal(ObjectDataOutput out) throws IOException { super.writeInternal(out); out.writeData(message); }
@Override public void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); permitCount = in.readInt(); } }
@Override public void beforeRun() throws Exception { super.beforeRun(); mapService = getService(); mapServiceContext = mapService.getMapServiceContext(); mapEventPublisher = mapServiceContext.getMapEventPublisher(); innerBeforeRun(); }
@Override public void onExecutionFailure(Throwable e) { // Execution failed so we should enable `returnsResponse` flag to prevent waiting anymore returnsResponse = true; super.onExecutionFailure(e); }
@Override protected void writeInternal(ObjectDataOutput out) throws IOException { super.writeInternal(out); out.writeUTF(simpleName); }
@Override protected void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); message = in.readData(); } }
@Override public void beforeRun() throws Exception { super.beforeRun(); mapService = getService(); mapServiceContext = mapService.getMapServiceContext(); mapEventPublisher = mapServiceContext.getMapEventPublisher(); innerBeforeRun(); }
@Override protected void writeInternal(ObjectDataOutput out) throws IOException { super.writeInternal(out); out.writeData(message); }
@Override protected void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); isLocal = in.readBoolean(); }
@Override public void writeInternal(ObjectDataOutput out) throws IOException { super.writeInternal(out); out.writeInt(permitCount); }
@Override public void readInternal(ObjectDataInput in) throws IOException { super.readInternal(in); permitCount = in.readInt(); } }