API Changes in StreamBase 6.0

Java API Changes in StreamBase 6.0

The following changes were made to support the new Tuple data type:

  • The DataType enum gained a new member: TUPLE

  • The Tuple class gained the following new methods:

    • void setTuple(Schema.Field field, Tuple tuple)

    • void setTuple(int fieldIndex, Tuple tuple)

    • void setTuple(String fieldName, Tuple tuple)

    • Tuple getTuple(Schema.Field field)

    • Tuple getTuple(int fieldIndex)

    • Tuple getTuple(String fieldName)

  • The following methods in the Tuple class were changed form returning no value to returning a value that indicates whether the setting of a field of type STRING resulted in a truncation:

    • int setString(Schema.field field, String value, boolean truncate)

    • int setString(int fieldIndex, String value, boolean truncate)

    • int setString(String fieldName, String value, boolean truncate)

    Because of the changes above, you must re-compile any StreamBase programs you have that call these changed methods.

  • The following methods were added to the Tuple class for similar reasons:

    • int setStringBuffer(Schema.Field field, ByteArrayView value, boolean truncate)

    • int setStringBuffer(int fieldIndex, ||ByteArrayView|| value, boolean truncate)

    • int setStringBuffer(String fieldName, ||ByteArrayView|| value, boolean truncate)

    • int setField(Schema.Field field, Object value, boolean truncate)

    • int set||Field||(int fieldIndex, Object|| value, boolean truncate)

    • int set||Field||(String fieldName, Object|| value, boolean truncate)

  • The Schema class gained these new methods:

    • Schema.Field getNestedField(String fieldName)

    • Schema.Field[] getNestedFields()

  • The Schema.Field class gained these new methods:

    • Schema getSchema()

    • String getShortName()

  • The Schema.Field class gained this new constructor:

    • Field(String, DataType, Schema)

The following changes relate to the removal of legacy high availability support:

  • The following methods in the StreamBaseAdminClient class are now deprecated and throw an exception if called:

    • clustershutdown()

    • clusterstart(String)

  • The following method in the StreamBaseURI class has been removed:

    • getPrimaryURI()

The following changes relate to the deprecation of the has header concept:

  • The following constructors in the Schema class are now deprecated. Equivalent constructors that lack the hasHeader Boolean parameter should be used instead:

    • Schema(String, boolean)

    • Schema(String, Schema.Field[], boolean)

    • Schema(String, Schema, boolean)

    • Schema(String, List, boolean)

    • Schema(String, List, boolean, java.nio.ByteOrder)

    • Schema(org.w3c.dom.Element, boolean)

  • The following method in the Schema class is now deprecated:

    • hasHeader()

The following changes make it possible to sub-class certain API classes:

  • The StreamBaseClient and StreamBaseAdminClient classes were changed from final to non-final.

The following new methods were added:

  • In the Schema class:

    • Tuple createTuple(String[] values)

    • String getDescription()

    • void setDescription(String description)

  • In the Schema.Field class:

    • String getDescription()

    • void setDescription(String description)

  • In the Tuple class:

    • Map getFields()

    • void setFields(Map)

    • String toString(boolean verbose)

  • In the StreamBaseURI class:

    • StreamBaseURI getBaseURI()

    • int getNumParameters()

    • String getParameter(String)

  • In the StreamBaseClient class:

    • Set getAllStreamProperties(EntityType)

    • Set getSubscribedStreamNames()

The following methods in the Operator class are now deprecated. The new Operator.getLogger() method should be used instead.

  • fatalError(String)

  • fatalError(Throwable)

  • fatalError(Throwable, int, Tuple)

  • logError(Exception)

  • logError(Exception, int, Tuple)

  • logError(String)

The new SBExpressionPropertyDescriptor class was added to allow adapters and operators to have properties whose values are computed at runtime as a function of the values of fields and dynamic variables.

Back to Top ^

C++ API Changes in StreamBase 6.0

The following changes were made to support the new Tuple data type:

  • The Tuple class gained these new methods:

    • void setTuple(Schema::Field field, Tuple tuple)

    • void setTuple(int fieldIndex, Tuple tuple)

    • void setTuple(std::string fieldName, Tuple tuple)

    • Tuple getTuple(Schema::Field field)

    • Tuple getTuple(int fieldIndex)

    • Tuple getTuple(std::string fieldName)

  • The Schema::Field class gained this new method:

    • Schema getSchema()

  • The Schema::Field class gained this new constructor:

    • Field(String, DataType, Schema)

The following changes relate to the removal of legacy high availability support:

  • These methods in the StreamBaseAdminClient class are now deprecated and throw an exception if called:

    • clustershutdown()

    • clusterstart(std::string)

The following changes relate to the deprecation of the has header concept:

  • The following method in the Schema class is now deprecated:

    • hasHeader()

Back to Top ^

.NET API Changes in StreamBase 6.0

The following changes have been made to support the new Tuple data type:

  • The Tuple class gained these new methods:

    • void SetTuple(Schema::Field field, Tuple tuple)

    • void SetTuple(int fieldIndex, Tuple tuple)

    • void SetTuple(String fieldName, Tuple tuple)

    • Tuple GetTuple(Schema::Field field)

    • Tuple GetTuple(int fieldIndex)

    • Tuple GetTuple(String fieldName)

  • The Schema::Field class gained this new method and new property:

    • Schema GetSchema()

    • Schema::Field::Schema

  • The Schema::Field class gained this new constructor:

    • Field(String, DataType, Schema)

The following convenience properties were added:

  • StreamProperties::QualifiedName

  • StreamProperties::Name

  • StreamProperties::ContainerName

  • StreamProperties::Schema

  • DequeueResult::StreamProperties

  • Schema::Name

  • Schema::Fields

  • Schema::Field::Index

  • Schema::Field::Size

  • Schema::Field::Name

  • StreamBaseURI::Host

  • StreamBaseURI::Container

  • StreamBaseURI::Port

  • StreamBaseURI::User

  • StreamBaseURI::Password

Back to Top ^