Class ResourceConfig

java.lang.Object
com.hazelcast.jet.config.ResourceConfig
All Implemented Interfaces:
DataSerializable, IdentifiedDataSerializable

@PrivateApi public class ResourceConfig extends Object implements IdentifiedDataSerializable
Describes a single resource to deploy to the Jet cluster.
Since:
Jet 3.0
  • Constructor Details

    • ResourceConfig

      public ResourceConfig(@Nonnull URL url, @Nullable String id, @Nonnull ResourceType resourceType)
      Creates a resource config with the given properties.
      Parameters:
      url - url of the resource
      id - id of the resource, if empty/null, derived from url
      resourceType - type of the resource
  • Method Details

    • fromClass

      public static Stream<ResourceConfig> fromClass(@Nonnull Class<?>... classes)
    • getUrl

      @Nonnull public URL getUrl()
      Returns the URL at which the resource is available. Resolved on the local machine during job submission.
    • getId

      @Nonnull public String getId()
      Returns the ID of the resource that will be used to form the IMap key under which it will be stored in the Jet cluster.
    • getResourceType

      @Nonnull public ResourceType getResourceType()
      Returns the type of the resource.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getFactoryId

      public int getFactoryId()
      Description copied from interface: IdentifiedDataSerializable
      Returns DataSerializableFactory factory ID for this class.
      Specified by:
      getFactoryId in interface IdentifiedDataSerializable
      Returns:
      factory ID
    • getClassId

      public int getClassId()
      Description copied from interface: IdentifiedDataSerializable
      Returns type identifier for this class. It should be unique per DataSerializableFactory.
      Specified by:
      getClassId in interface IdentifiedDataSerializable
      Returns:
      type ID
    • writeData

      public void writeData(ObjectDataOutput out) throws IOException
      Description copied from interface: DataSerializable
      Writes object fields to output stream
      Specified by:
      writeData in interface DataSerializable
      Parameters:
      out - output
      Throws:
      IOException - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
    • readData

      public void readData(ObjectDataInput in) throws IOException
      Description copied from interface: DataSerializable
      Reads fields from the input stream
      Specified by:
      readData in interface DataSerializable
      Parameters:
      in - input
      Throws:
      IOException - if an I/O error occurs. In particular, an IOException may be thrown if the input stream has been closed.