Package com.hazelcast.jet.config
Class ResourceConfig
java.lang.Object
com.hazelcast.jet.config.ResourceConfig
- All Implemented Interfaces:
DataSerializable
,IdentifiedDataSerializable
Describes a single resource to deploy to the Jet cluster.
- Since:
- Jet 3.0
-
Constructor Summary
ConstructorDescriptionResourceConfig
(URL url, String id, ResourceType resourceType) Creates a resource config with the given properties. -
Method Summary
Modifier and TypeMethodDescriptionboolean
static Stream<ResourceConfig>
int
Returns type identifier for this class.int
Returns DataSerializableFactory factory ID for this class.getId()
Returns the ID of the resource that will be used to form theIMap
key under which it will be stored in the Jet cluster.Returns the type of the resource.getUrl()
Returns the URL at which the resource is available.int
hashCode()
void
Reads fields from the input streamtoString()
void
Writes object fields to output stream
-
Constructor Details
-
ResourceConfig
Creates a resource config with the given properties.- Parameters:
url
- url of the resourceid
- id of the resource, if empty/null
, derived fromurl
resourceType
- type of the resource
-
-
Method Details
-
fromClass
-
getUrl
Returns the URL at which the resource is available. Resolved on the local machine during job submission. -
getId
Returns the ID of the resource that will be used to form theIMap
key under which it will be stored in the Jet cluster. -
getResourceType
Returns the type of the resource. -
toString
-
equals
-
hashCode
public int hashCode() -
getFactoryId
public int getFactoryId()Description copied from interface:IdentifiedDataSerializable
Returns DataSerializableFactory factory ID for this class.- Specified by:
getFactoryId
in interfaceIdentifiedDataSerializable
- 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 interfaceIdentifiedDataSerializable
- Returns:
- type ID
-
writeData
Description copied from interface:DataSerializable
Writes object fields to output stream- Specified by:
writeData
in interfaceDataSerializable
- Parameters:
out
- output- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the output stream has been closed.
-
readData
Description copied from interface:DataSerializable
Reads fields from the input stream- Specified by:
readData
in interfaceDataSerializable
- Parameters:
in
- input- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the input stream has been closed.
-