Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
/**
* Created by andre on 20/06/15.
*/
public class Utilities {
public final class Utilities {
private Utilities() {
throw new InstantiationError( "Must not instantiate this class" );
}
/**
* Creates a hexademical representation of the bit set
*
Expand Down
4 changes: 4 additions & 0 deletions affinity/src/main/java/net/openhft/ticker/Ticker.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ public final class Ticker {
}
}

private Ticker() {
throw new InstantiationError( "Must not instantiate this class" );
}

/**
* @return The current value of the system timer, in nanoseconds.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
/**
* @author peter.lawrey
*/
public class AffinityLockBindMain {
public final class AffinityLockBindMain {
private AffinityLockBindMain() {
throw new InstantiationError( "Must not instantiate this class" );
}

public static void main(String... args) throws InterruptedException {
AffinityLock al = AffinityLock.acquireLock();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
/**
* @author peter.lawrey
*/
public class AffinityLockMain {
public final class AffinityLockMain {
private AffinityLockMain() {
throw new InstantiationError( "Must not instantiate this class" );
}

public static void main(String... args) throws InterruptedException {
AffinityLock al = AffinityLock.acquireLock();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
/**
* @author peter.lawrey
*/
public class AffinitySupportMain {
public final class AffinitySupportMain {
private AffinitySupportMain() {
throw new InstantiationError( "Must not instantiate this class" );
}

public static void main(String... args) {
AffinityLock al = AffinityLock.acquireLock();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@
/**
* @author peter.lawrey
*/
public class AffinityThreadFactoryMain {
public final class AffinityThreadFactoryMain {
private static final ExecutorService ES = Executors.newFixedThreadPool(4,
new AffinityThreadFactory("bg", SAME_CORE, DIFFERENT_SOCKET, ANY));

private AffinityThreadFactoryMain(){
throw new InstantiationError( "Must not instantiate this class" );
}
public static void main(String... args) throws InterruptedException {
for (int i = 0; i < 12; i++)
ES.submit(new Callable<Void>() {
Expand Down