Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
275456f
Bug fixes for Warp10 persistence
olivier-tritschler Oct 31, 2025
45341ae
initial commit of Core->Abstractions refactor
ripleyb Feb 6, 2026
942401a
Updating network based calls to use CompletableFutures
ripleyb Feb 9, 2026
d70611c
Merge branch 'main-senx-persistence' into br-4.0dev
ripleyb Feb 11, 2026
4e63830
Update processing context
ripleyb Feb 26, 2026
a17e27f
Update DigitalTwinBase
ripleyb Feb 26, 2026
c1b7c15
Refactor DigitalTwinBase + ProcessingContext
ripleyb Mar 12, 2026
ce94389
Update all headers + purge warnings from abstractions
ripleyb Mar 12, 2026
8701fa2
Update pom.xml to show warnings
ripleyb Mar 13, 2026
fbea455
Updates for Alert Providers
ripleyb Mar 17, 2026
f3e7bcd
Update init context/processing context to store true type information…
ripleyb Mar 19, 2026
51bdeb4
Update abstractions/development artifact id, update development for a…
ripleyb Mar 24, 2026
6c23ea8
Adding next sim time + source app id to base class, removing timer ha…
ripleyb Mar 27, 2026
2d80af8
Update base class to match .NET, Timer improvements
ripleyb Apr 2, 2026
dd08b07
Changes for twin removal
ripleyb Apr 9, 2026
ba9ba75
Update workbench to support remove
ripleyb Apr 9, 2026
e5a2762
Removing unused special creates from simulation controller
ripleyb Apr 17, 2026
e02187f
Remove serializable from SimulationProcessor
ripleyb Apr 17, 2026
4f90a97
Doc fixes, workbench synchronization
ripleyb May 8, 2026
2d20e9f
Update createresult docs
ripleyb May 14, 2026
d068f76
Removing old docs
ripleyb May 14, 2026
4cd62a7
Docs update
ripleyb May 14, 2026
f266e1a
Update gitignore
ripleyb May 14, 2026
70638df
Updating local build scripts + readme's for proper mvn central links
ripleyb May 14, 2026
329d35d
Rebuild javadocs and publish
ripleyb May 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,6 @@ gradlew.bat
Development/gradle/wrapper/gradle-wrapper.properties
Core/gradle/wrapper/gradle-wrapper.jar
Core/gradle/wrapper/gradle-wrapper.jar
/Development/target
/Abstractions/target
/docs/digitaltwin-core-docs/target
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions Abstractions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ScaleOut Digital Twins™ Abstractions Libraries for Java

The open source (Apache 2.0 licensed) project for the digitaltwin-abstractions API:

- [com.scaleoutsoftware.digitaltwin:digitaltwin-abstractions](https://mvnrepository.com/artifact/com.scaleoutsoftware.digitaltwin/digitaltwin-abstractions/3.0.0): Abstract datatypes required for building Digital Twin models.


## Documentation
- [Class reference](https://scaleoutsoftware.github.io/JavaDigitalTwinCore/)
- [ScaleOut Digital Twins™ User Guide](https://static.scaleoutsoftware.com/docs/digital_twin_user_guide/index.html)
8 changes: 8 additions & 0 deletions Abstractions/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
rem ********************
rem * Requirements *
rem ********************
rem * Java JDK 8
rem * MVN 3.x
SET JAVA_HOME=C:\path\to\java8
SET MVN_HOME=C:\path\to\maven
call mvn clean package install javadoc:jar source:jar
7 changes: 7 additions & 0 deletions Abstractions/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env sh
export JAVA_HOME="/path/to/java8"
export MVN_HOME="/path/to/maven"

export PATH="$JAVA_HOME/bin:$MVN_HOME/bin:$PATH"

mvn clean package install javadoc:jar source:jar
30 changes: 30 additions & 0 deletions Abstractions/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.scaleoutsoftware.digitaltwin</groupId>
<artifactId>digitaltwin-abstractions</artifactId>
<version>3.0.0</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<proc>none</proc>
<showWarnings>true</showWarnings>
<compilerArgs>
<arg>-Xlint:all</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2025 by ScaleOut Software, Inc.
Copyright (c) 2026 by ScaleOut Software, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.scaleoutsoftware.digitaltwin.core;
package com.scaleoutsoftware.digitaltwin.abstractions;

import java.util.HashMap;

Expand All @@ -26,7 +26,7 @@ public class AlertMessage {
private final String _message;
private final HashMap<String,String> _optionalTwinInstanceProperties;

private AlertMessage() {_title = _severity = _message = null; _optionalTwinInstanceProperties = null;}
private AlertMessage() { _title = _severity = _message = null; _optionalTwinInstanceProperties = null;}

/**
* Construct an alert message with a title, severity, and custom message.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2025 by ScaleOut Software, Inc.
Copyright (c) 2026 by ScaleOut Software, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.scaleoutsoftware.digitaltwin.core;
package com.scaleoutsoftware.digitaltwin.abstractions;

import java.util.List;
import java.util.Map;
Expand All @@ -22,20 +22,14 @@
/**
* An interface that can be used for persisting/retrieving the state of real-time digital twins.
*/
public interface PersistenceProvider {
public interface AzureDigitalTwinsProvider {

/**
* Returns true if this PersistenceProvider is active, false otherwise.
* @return true if this PersistenceProvider is active, false otherwise.
*/
public abstract boolean isActive();

/**
* Retrieves this persistence providers type. Currently supported provider types: AzureDigitalTwins.
* @return the persistence provider type.
*/
public PersistenceProviderType getProviderType();

/**
* Retrieves a future that when complete will return the instance IDs stored in a container, or an empty list if no instances exist.
* @param containerName the container name.
Expand Down Expand Up @@ -121,42 +115,4 @@ public interface PersistenceProvider {
* @return the property or null if the property does not exist.
*/
public <T> T getProperty(String containerName, String instanceId, String propertyName, Class<T> clazz);

/**
* Retrieves a future that will complete exceptionally or return void if the RTDT's property was successfully updated.
* Updates a RTDT property for the provided instance id specified by the property name and property value.
* @param instanceId the instance id.
* @param propertyName the property name.
* @param propertyValue the property value.
* @return a future that will complete exceptionally or return void.
*/
public CompletableFuture<Void> updateRtdtPropertyAsync(String instanceId, String propertyName, Object propertyValue);

/**
* Updates a RTDT property for the provided instance id specified by the property name and property value.
* @param instanceId the instance id.
* @param propertyName the property name.
* @param propertyValue the property value.
*/
public void updateRtdtProperty(String instanceId, String propertyName, Object propertyValue);

/**
* Retrieves a future that will return a property value for a RTDT instance or null if the property doesn't exist.
* @param instanceId the instance id.
* @param propertyName the property name.
* @param clazz the class of the property type
* @param <T> the type of the property to return.
* @return a future that will return a property value for a RTDT instance.
*/
public <T> CompletableFuture<T> getRtdtPropertyAsync(String instanceId, String propertyName, Class<T> clazz);

/**
* Retrieves a property for a RTDT instance or null if the property does not exist.
* @param instanceId the instance id.
* @param propertyName the property name.
* @param clazz the class of the property type.
* @param <T> the type of the property to return.
* @return the property value.
*/
public <T> T getRtdtProperty(String instanceId, String propertyName, Class<T> clazz);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2025 by ScaleOut Software, Inc.
Copyright (c) 2026 by ScaleOut Software, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.scaleoutsoftware.digitaltwin.core;
package com.scaleoutsoftware.digitaltwin.abstractions;

/**
* Status of a cache operation.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2025 by ScaleOut Software, Inc.
Copyright (c) 2026 by ScaleOut Software, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.scaleoutsoftware.digitaltwin.core;
package com.scaleoutsoftware.digitaltwin.abstractions;

/**
* Represents a response from a {@link SharedData} operation.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2025 by ScaleOut Software, Inc.
Copyright (c) 2026 by ScaleOut Software, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -13,18 +13,18 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.scaleoutsoftware.digitaltwin.core;
package com.scaleoutsoftware.digitaltwin.abstractions;

/**
* The result from a message processor which indicates to update the state object or to ignore
* Enum indicating the status of a delete operation.
*/
public enum ProcessingResult {
public enum CreateResult {
/**
* Update the digital twin.
* The twin instance was successfully created.
*/
UpdateDigitalTwin,
Success,
/**
* Do not update the digital twin.
* The twin instance already existed and could not be created.
*/
NoUpdate
ObjectExists
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2025 by ScaleOut Software, Inc.
Copyright (c) 2026 by ScaleOut Software, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -13,18 +13,18 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.scaleoutsoftware.digitaltwin.core;
package com.scaleoutsoftware.digitaltwin.abstractions;

/**
* Enum representation of the available timer types
* Enum indicating the status of a delete operation.
*/
public enum TimerType {
public enum DeleteResult {
/**
* This timer should reoccur on a schedule.
* The twin instance was successfully deleted.
*/
Recurring,
Success,
/**
* This timer should trigger one time.
* The target twin instance was not found.
*/
OneTime
NotFound
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
/*
Copyright (c) 2026 by ScaleOut Software, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.scaleoutsoftware.digitaltwin.abstractions;

import java.util.Date;
import java.util.HashMap;

/**
* A real-time digital twin of a data source. The implementation of the real-time DigitalTwin should have a parameterless constructor for
* basic initialization.
*/
public abstract class DigitalTwinBase<T extends DigitalTwinBase<T>> {

/* capitalized to match .NET serialization */
/**
* The identifier for this twin instance
*/
public String Id = "";

/**
* The model this twin instance belongs to.
*/
public String Model = "";

/**
* DO NOT MODIFY. This property is managed by the service. Used to send messages to the instances data source.
*/
public int SourceNamespaceAppId;

/**
* DO NOT MODIFY. This property is managed by the service. Used to store the instances next simulation time; managed by the
* service in case of load balancing or server failures.
*/
public long NextSimulationTimeUnixMsec;

/**
* Default constructor.
*/
public DigitalTwinBase() {}

/**
* The identifier of this DigitalTwin.
* @return the identifier of this digital twin
*/
public String getId() {
return Id;
}

/**
* The model for this DigitalTwin.
* @return the model for this DigitalTwin
*/
public String getModel() {
return Model;
}

/**
* INTERNAL: DO NOT MODIFY. This property is managed by the service.
*
* Used for sending messages back to the instances data source.
*
* @return the source App ID namespace
*/
public int getSourceAppIdNamespace() {
return SourceNamespaceAppId;
}

/**
* INTERNAL: DO NOT MODIFY. This property is managed by the service.
* @param sourceAppIdNamespace assign this instance a new source app ID namespace.
*/
public void setSourceAppIdNamespace(int sourceAppIdNamespace) {
SourceNamespaceAppId = sourceAppIdNamespace;
}

/**
* INTERNAL: DO NOT MODIFY. This property is managed by the service.
*
* Retrieve the next simulation time for this instance.
*
* @return the next simulation time for this instance.
*/
public long getNextSimulationTimeUnixMsec() {
return NextSimulationTimeUnixMsec;
}

/**
* INTERNAL: DO NOT MODIFY. This property is managed by the service.
*
* Assign this instance the next simulation time when the instance will be run.
*
* @param nextSimulationTimeUnixMsec the next simulation time when the instance will be run.
*/
public void setNextSimulationTimeUnixMsec(long nextSimulationTimeUnixMsec) {
NextSimulationTimeUnixMsec = nextSimulationTimeUnixMsec;
}

/**
* Initialization method to set the identifier and model for a DigitalTwin instance. Optionally use the
* {@link InitContext} to start a timer.
* @param context the initialization context.
* @throws IllegalStateException if init is called after initialization.
*/
public void init(InitContext<T> context) throws IllegalStateException {
this.Id = context.getId();
this.Model = context.getModel();
}
}
Loading