Configuring Sun Master Indexes (Repository)

Configuring Master Index EUIDs (Repository)

The EUID Generator controls how the enterprise-wide unique identifiers (EUIDs) are created by the master index application, including the length of the ID and the checksum value. The EUID generator can only be configured by modifying the Threshold file directly.

You can customize the EUID Generator by performing any of the following actions:

Specifying the Master Index EUID Generator Class (Repository)

The default EUID generator creates sequential EUIDs based on the value specified for the EUID sequence in the sbyn_seq_table database table. If you create a new EUID generator class to process EUIDs differently, you must specify the name of the new class in the euid-generator-class element of the Threshold file.

ProcedureTo Specify the EUID Generator Class

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click the Threshold file.

  2. Scroll to the EuidGeneratorConfig element.

  3. Change the value of the euid-generator-class element to the path and name of the new EUID generator class.

    For example:


    <euid-generator-class>com.stc.eindex.idgen.impl.MyEuidGenerator
    </euid-generator-class>
  4. Save and close the file.

Specifying the Master Index EUID Length (Repository)

By default, the length of the EUIDs generated by the master index application is 10 characters. You can modify this value if needed. You can also specify a new starting EUID number. This is described in Creating the Master Index Database (Repository) in Developing Sun Master Indexes (Repository).

If you increase the length of the EUIDs to longer than 20 characters or if the EUID length plus the checksum length is longer than 20 characters, you need to increase the length of the EUID columns in the script that creates the database tables.

ProcedureTo Specify the EUID Length

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click the Threshold file.

  2. Scroll to the first parameter element, IdLength, in the EuidGeneratorConfig element.

  3. Change the value of the parameter-value element to the desired length of the EUID.

    For example:


    <parameter>
       <parameter-name>IdLength</parameter-name>
       <parameter-type>java.lang.Integer</parameter-type>
       <parameter-value>12</parameter-value> 
    </parameter>
  4. Save and close the file.

Specifying a Master Index Checksum Length (Repository)

A checksum value is a number appended to the end of each EUID that allows systems to validate EUIDs to ensure accurate identification of records throughout the network. For detailed information about checksum values and how they work, see Manager Service Components (Repository) in Understanding Sun Master Index Configuration Options (Repository).

If you specify 0 (zero), checksum values are not used for validation. If the EUID length plus the checksum length is greater than 20, you need to increase the length of the EUID columns in the database creation scripts.

ProcedureTo Specify a Checksum Length

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click the Threshold file.

  2. Scroll to the second parameter element, ChecksumLength, in the EuidGeneratorConfig element.

  3. Change the value of the parameter-value element to the desired length of the checksum value.

    For example:


    <parameter>
       <parameter-name>ChecksumLength</parameter-name>
       <parameter-type>java.lang.Integer</parameter-type>
       <parameter-value>2</parameter-value> 
    </parameter>
  4. Save and close the file.

Specifying the Master Index Chunk Size (Repository)

You can specify a number of EUIDs to be allocated at one time to the EUID generator. This allows the generator to assign EUIDs to multiple records without needing to query the sbyn_seq_table database table each time, which improves performance. For detailed information about the chunk size and how EUIDs are allocated, see Manager Service Components (Repository) in Understanding Sun Master Index Configuration Options (Repository).

ProcedureTo Specify the Chunk Size

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click the Threshold file.

  2. Scroll to the third parameter element, ChunkSize, in the EuidGeneratorConfig element.

  3. Change the value of the parameter-value element to the desired chunk size.

    For example:


    <parameter>
        <parameter-name>EuidGeneratorConfig</parameter-name>
        <parameter-type>java.lang.Integer</parameter-type>
        <parameter-value>100</parameter-value>
    </parameter>
  4. Save and close the file.

Adding and Deleting Master Index EUID Generator Parameters (Repository)

You cannot add or delete parameters for the default EUID Generator class, but if you create a custom EUID generator class, you can create additional parameters for the new class and delete the existing parameters if they are not used.

ProcedureTo Add EUID Generator Parameters

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click the Threshold file.

  2. Scroll to the EuidGeneratorConfig element.

  3. Create a new parameter element inside the parameters element, but outside any existing parameter elements. Add the following elements:

    • parameter-name – The name of the parameter.

    • parameter-type – The type of parameter. Valid values are java.lang.Long, java.lang.Short, java.lang.Byte, java.lang.String, java.lang.Integer, java.lang.Boolean, java.lang.Double, or java.lang.Float.

    • parameter-value – The value of the parameter.

      For example:


      <parameters>
          <parameter>
            <parameter-name>IdLength</parameter-name>
            <parameter-type>java.lang.Integer</parameter-type>
            <parameter-value>10</parameter-value>
          </parameter>
          <parameter>
            <parameter-name>IncrementBy</parameter-name>
            <parameter-type>java.lang.Integer</parameter-type>
            <parameter-value>5</parameter-value>
         </parameter>
      </parameters>
  4. Save and close the file.

ProcedureTo Delete EUID Generator Parameters

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click the Threshold file.

  2. Scroll to the EuidGeneratorConfig element.

  3. To delete one parameter, do the following:

    1. Scroll to the parameter element you want to delete.

    2. Remove all text between and including the parameter element.

      For example, to remove the StartNumber parameter in the sample below, delete all boldface text.


      <parameters>
          <parameter>
             <parameter-name>IdLength</parameter-name>
             <parameter-type>java.lang.Integer</parameter-type>
             <parameter-value>10</parameter-value>
          </parameter>
          <parameter>
             <parameter-name>StartNumber</parameter-name>
             <parameter-type>java.lang.Integer</parameter-type>
             <parameter-value>1000000001</parameter-value>
          </parameter>
      </parameters>
  4. To remove all parameters, remove all text between and including the parameters element.

  5. Save and close the file.