-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2822d09
commit b34e098
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package ser; | ||
|
||
import org.nustaq.serialization.FSTConfiguration; | ||
|
||
import java.net.InetAddress; | ||
import java.net.UnknownHostException; | ||
|
||
/** | ||
* Created by ruedi on 29/10/15. | ||
*/ | ||
public class ForceSerIssue89 { | ||
|
||
public static class JettyInfo { | ||
private final InetAddress ipAddress; | ||
private final Integer port; | ||
private final boolean isCoordinator; | ||
private final String controllerId; | ||
|
||
public JettyInfo(final InetAddress ipAddress, final Integer port, final boolean isCoordinator, final String controllerId) { | ||
this.ipAddress = ipAddress; | ||
this.port = port; | ||
this.isCoordinator = isCoordinator; | ||
this.controllerId = controllerId; | ||
} | ||
|
||
//getters for all fields | ||
} | ||
|
||
public static void main(String[] args) throws UnknownHostException { | ||
FSTConfiguration conf = FSTConfiguration.createFastBinaryConfiguration().setForceSerializable(true); | ||
JettyInfo poaksd1 = new JettyInfo(InetAddress.getLocalHost(), 8888, true, "poaksd"); | ||
Object poaksd = conf.asObject(conf.asByteArray(poaksd1)); | ||
System.out.println("POK"); | ||
} | ||
|
||
} |