public static EventProcessingOption determineEventProcessingMode(String mode) { if ( STREAM.getMode().equalsIgnoreCase( mode ) ) { return STREAM; } else if ( CLOUD.getMode().equalsIgnoreCase( mode ) ) { return CLOUD; } throw new IllegalArgumentException( "Illegal enum value '" + mode + "' for EventProcessingMode" ); } }
public String getEventProcessingMode() { return conf.getEventProcessingMode().toExternalForm(); }
if ( e != null && !StringUtils.isEmpty( e.getAttribute( "mode" ) ) ) { rbaseConfBuilder.addPropertyValue( "eventProcessingMode", EventProcessingOption.valueOf( e.getAttribute( "mode" ) ) );
@Override protected void updateDependentTypes( Package newPkg, TypeDeclaration typeDeclaration ) { // update OTNs if( this.getConfiguration().getEventProcessingMode().equals( EventProcessingOption.STREAM ) ) { // if the expiration for the type was set, then add 1, otherwise return -1 long exp = typeDeclaration.getExpirationOffset() > -1 ? typeDeclaration.getExpirationOffset() + 1 : -1; // if we are running in STREAM mode, update expiration offset for( EntryPointNode ep : this.rete.getEntryPointNodes().values() ) { for( ObjectTypeNode node : ep.getObjectTypeNodes().values() ) { if( node.isAssignableFrom( typeDeclaration.getObjectType() ) ) { node.setExpirationOffset( Math.max( node.getExpirationOffset(), exp ) ); } } } } }
setMaxThreads(StringUtils.isEmpty(value) ? 3 : Integer.parseInt(value)); } else if ( name.equals( EventProcessingOption.PROPERTY_NAME ) ) { setEventProcessingMode(EventProcessingOption.determineEventProcessingMode(StringUtils.isEmpty(value) ? "cloud" : value)); } else if ( name.equals( MBeansOption.PROPERTY_NAME ) ) { setMBeansEnabled(MBeansOption.isEnabled(value));
if ( e != null && !StringUtils.isEmpty( e.getAttribute( "mode" ) ) ) { rbaseConfBuilder.addPropertyValue( "eventProcessingMode", EventProcessingOption.valueOf( e.getAttribute( "mode" ) ) );
if (EventProcessingOption.STREAM.equals( rulebase.getConfiguration().getEventProcessingMode() )) { TemporalDependencyMatrix temporal = this.utils.calculateTemporalDistance( subrules[i] ); context.setTemporalDistance( temporal );
"3" ) ) ); setEventProcessingMode( EventProcessingOption.determineEventProcessingMode( this.chainedProperties.getProperty( EventProcessingOption.PROPERTY_NAME, "cloud" ) ) );
public static EventProcessingOption determineEventProcessingMode(String mode) { if ( STREAM.getMode().equalsIgnoreCase( mode ) ) { return STREAM; } else if ( CLOUD.getMode().equalsIgnoreCase( mode ) ) { return CLOUD; } throw new IllegalArgumentException( "Illegal enum value '" + mode + "' for EventProcessingMode" ); } }
objectType, context ); if ( objectType.isEvent() && EventProcessingOption.STREAM.equals( context.getRuleBase().getConfiguration().getEventProcessingMode() ) ) { long expirationOffset = getExpiratioOffsetForType( context, objectType );
props.setProperty( "name", kbase.getName() ); props.setProperty( "eventProcessingMode", kbase.getEventProcessingMode().toExternalForm() ); props.setProperty( "equalsBehavior", kbase.getEqualsBehavior().toString() );
public static EventProcessingOption determineEventProcessingMode(String mode) { if ( STREAM.getMode().equalsIgnoreCase( mode ) ) { return STREAM; } else if ( CLOUD.getMode().equalsIgnoreCase( mode ) ) { return CLOUD; } throw new IllegalArgumentException( "Illegal enum value '" + mode + "' for EventProcessingMode" ); } }
return Integer.toString(getMaxThreads()); } else if ( name.equals( EventProcessingOption.PROPERTY_NAME ) ) { return getEventProcessingMode().getMode(); } else if ( name.equals( MBeansOption.PROPERTY_NAME ) ) { return isMBeansEnabled() ? "enabled" : "disabled";