@Test public void throughputInMemoryStrictUpdateCheckingServiceRemotePut() throws Throwable { int serviceCount = 4; int updateCount = 20; List<Service> services = this.host.doThroughputServiceStart( serviceCount, MinimalTestService.class, this.host.buildMinimalTestState(), EnumSet.of(Service.ServiceOption.STRICT_UPDATE_CHECKING), null); List<Service> durableServices = this.host.doThroughputServiceStart( serviceCount, MinimalTestService.class, this.host.buildMinimalTestState(), EnumSet.of(ServiceOption.STRICT_UPDATE_CHECKING, ServiceOption.PERSISTENCE), null); this.host.log("starting remote test"); for (int i = 0; i < 3; i++) { this.host.doPutPerService(updateCount, EnumSet.of(TestProperty.FORCE_REMOTE), services); this.host.doPutPerService(updateCount, EnumSet.of(TestProperty.FORCE_REMOTE), durableServices); } this.host.log("starting expected failure test"); this.host.toggleNegativeTestMode(true); int count = 2; this.host.doPutPerService(count, EnumSet.of(TestProperty.FORCE_REMOTE, TestProperty.FORCE_FAILURE), services); this.host.doPutPerService(count, EnumSet.of(TestProperty.FORCE_REMOTE, TestProperty.FORCE_FAILURE), durableServices); this.host.toggleNegativeTestMode(false); }
public void log(Level level, String fmt, Object... args) { doLogging(level, () -> String.format(fmt, args)); }
StatefulService implements Service { public void log(Level level, String fmt, Object... args) { doLogging(level, () -> String.format(fmt, args)); } }
StatefulService implements Service { public void log(Level level, String fmt, Object... args) { doLogging(level, () -> String.format(fmt, args)); } StatefulService(Class<? extends ServiceDocument> stateType);  StatefulService(Class<? extends ServiceDocument> stateType,
            EnumSet<ServiceOption> options); }
StatefulService implements Service { public void log(Level level, String fmt, Object... args) { doLogging(level, () -> String.format(fmt, args)); } StatefulService(Class<? extends ServiceDocument> stateType);  StatefulService(Class<? extends ServiceDocument> stateType,
            EnumSet<ServiceOption> options); @Override OperationProcessingChain getOperationProcessingChain(); @Override Service.ProcessingStage getProcessingStage(); @Override void handleCreate(Operation post); @Override void handleStart(Operation post); @Override void authorizeRequest(Operation op); @Override boolean queueRequest(Operation op); @Override void handleRequest(Operation request); @Override void handleRequest(Operation request, OperationProcessingStage opProcessingStage); void handlePost(Operation post); void handleDelete(Operation delete); @Override void handleStop(Operation delete); void handlePatch(Operation patch); void handleOptions(Operation options); void handlePut(Operation put); void handleGet(Operation get); @Override Operation dequeueRequest(); @Override void setStat(String name, double newValue); @Override void setStat(ServiceStat s, double newValue); @Override void adjustStat(ServiceStat s, double delta); @Override void adjustStat(String name, double delta); @Override ServiceStat getStat(String name); ServiceStat getStat(String name, boolean create); @Override String getSelfLink(); @Override URI getUri(); @Override ServiceHost getHost(); @Override boolean hasOption(Service.ServiceOption cap); @Override void toggleOption(ServiceOption option, boolean enable); @Override void setSelfLink(String path); @Override void setHost(ServiceHost serviceHost); @Override void setOperationProcessingChain(OperationProcessingChain opProcessingChain); @Override void setProcessingStage(ProcessingStage stage); @Override Service getUtilityService(String uriPath, boolean allocate); @Override void sendRequest(Operation op); ServiceDocumentDescription getStateDescription(); @Override ServiceStats getStats(); @Override ServiceDocument getDocumentTemplate(); void logSevere(Throwable e); void logSevere(String fmt, Object... args); void logSevere(Supplier<String> messageSupplier); void logInfo(String fmt, Object... args); void logInfo(Supplier<String> messageSupplier); void logFine(String fmt, Object... args); void logFine(Supplier<String> messageSupplier); void logWarning(String fmt, Object... args); void logWarning(Supplier<String> messageSupplier); void log(Level level, String fmt, Object... args); void log(Level level, Supplier<String> messageSupplier); @Override void handleMaintenance(Operation post); void handlePeriodicMaintenance(Operation post); void handleNodeGroupMaintenance(Operation post); @Override ServiceDocument setInitialState(Object state, Long version); @Override String getPeerNodeSelectorPath(); @Override void setPeerNodeSelectorPath(String link); @Override String getDocumentIndexPath(); @Override void setDocumentIndexPath(String link); @Override EnumSet<ServiceOption> getOptions(); @Override void setState(Operation op, ServiceDocument newState); @SuppressWarnings("unchecked") @Override T getState(Operation op); void setAvailable(boolean isAvailable); boolean isAvailable(); @Override void setMaintenanceIntervalMicros(long micros); @Override void setCacheClearDelayMicros(long micros); @Override long getMaintenanceIntervalMicros(); @Override long getCacheClearDelayMicros(); @Override Class<? extends ServiceDocument> getStateType(); @Override void handleConfigurationRequest(Operation request); @Override final void setAuthorizationContext(Operation op, AuthorizationContext ctx); final Signer getTokenSigner(); @Override final AuthorizationContext getSystemAuthorizationContext(); final AuthorizationContext getAuthorizationContextForSubject(String subject); }
StatefulService implements Service { public void log(Level level, String fmt, Object... args) { doLogging(level, () -> String.format(fmt, args)); } StatefulService(Class<? extends ServiceDocument> stateType);  StatefulService(Class<? extends ServiceDocument> stateType,
            EnumSet<ServiceOption> options); @Override OperationProcessingChain getOperationProcessingChain(); @Override Service.ProcessingStage getProcessingStage(); @Override void handleCreate(Operation post); @Override void handleStart(Operation post); @Override void authorizeRequest(Operation op); @Override boolean queueRequest(Operation op); @Override void handleRequest(Operation request); @Override void handleRequest(Operation request, OperationProcessingStage opProcessingStage); void handlePost(Operation post); void handleDelete(Operation delete); @Override void handleStop(Operation delete); void handlePatch(Operation patch); void handleOptions(Operation options); void handlePut(Operation put); void handleGet(Operation get); @Override Operation dequeueRequest(); @Override void setStat(String name, double newValue); @Override void setStat(ServiceStat s, double newValue); @Override void adjustStat(ServiceStat s, double delta); @Override void adjustStat(String name, double delta); @Override ServiceStat getStat(String name); ServiceStat getStat(String name, boolean create); @Override String getSelfLink(); @Override URI getUri(); @Override ServiceHost getHost(); @Override boolean hasOption(Service.ServiceOption cap); @Override void toggleOption(ServiceOption option, boolean enable); @Override void setSelfLink(String path); @Override void setHost(ServiceHost serviceHost); @Override void setOperationProcessingChain(OperationProcessingChain opProcessingChain); @Override void setProcessingStage(ProcessingStage stage); @Override Service getUtilityService(String uriPath, boolean allocate); @Override void sendRequest(Operation op); ServiceDocumentDescription getStateDescription(); @Override ServiceStats getStats(); @Override ServiceDocument getDocumentTemplate(); void logSevere(Throwable e); void logSevere(String fmt, Object... args); void logSevere(Supplier<String> messageSupplier); void logInfo(String fmt, Object... args); void logInfo(Supplier<String> messageSupplier); void logFine(String fmt, Object... args); void logFine(Supplier<String> messageSupplier); void logWarning(String fmt, Object... args); void logWarning(Supplier<String> messageSupplier); void log(Level level, String fmt, Object... args); void log(Level level, Supplier<String> messageSupplier); @Override void handleMaintenance(Operation post); void handlePeriodicMaintenance(Operation post); void handleNodeGroupMaintenance(Operation post); @Override ServiceDocument setInitialState(Object state, Long version); @Override String getPeerNodeSelectorPath(); @Override void setPeerNodeSelectorPath(String link); @Override String getDocumentIndexPath(); @Override void setDocumentIndexPath(String link); @Override EnumSet<ServiceOption> getOptions(); @Override void setState(Operation op, ServiceDocument newState); @SuppressWarnings("unchecked") @Override T getState(Operation op); void setAvailable(boolean isAvailable); boolean isAvailable(); @Override void setMaintenanceIntervalMicros(long micros); @Override void setCacheClearDelayMicros(long micros); @Override long getMaintenanceIntervalMicros(); @Override long getCacheClearDelayMicros(); @Override Class<? extends ServiceDocument> getStateType(); @Override void handleConfigurationRequest(Operation request); @Override final void setAuthorizationContext(Operation op, AuthorizationContext ctx); final Signer getTokenSigner(); @Override final AuthorizationContext getSystemAuthorizationContext(); final AuthorizationContext getAuthorizationContextForSubject(String subject);  }