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
ConstructorsConstructorDescriptionResourceConfig(URL url, String id, ResourceType resourceType) Creates a resource config with the given properties. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic Stream<ResourceConfig>intReturns type identifier for this class.intReturns DataSerializableFactory factory ID for this class.getId()Returns the ID of the resource that will be used to form theIMapkey 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.inthashCode()voidReads fields from the input streamtoString()voidWrites 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 fromurlresourceType- 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 theIMapkey 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:IdentifiedDataSerializableReturns DataSerializableFactory factory ID for this class.- Specified by:
getFactoryIdin interfaceIdentifiedDataSerializable- Returns:
- factory ID
-
getClassId
public int getClassId()Description copied from interface:IdentifiedDataSerializableReturns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
getClassIdin interfaceIdentifiedDataSerializable- Returns:
- type ID
-
writeData
Description copied from interface:DataSerializableWrites object fields to output stream- Specified by:
writeDatain interfaceDataSerializable- Parameters:
out- output- Throws:
IOException- if an I/O error occurs. In particular, anIOExceptionmay be thrown if the output stream has been closed.
-
readData
Description copied from interface:DataSerializableReads fields from the input stream- Specified by:
readDatain interfaceDataSerializable- Parameters:
in- input- Throws:
IOException- if an I/O error occurs. In particular, anIOExceptionmay be thrown if the input stream has been closed.
-