Sho SHIMIZU
Committed by Gerrit Code Review

Remove "public" to follow our convention

Change-Id: Ic5fa8744cbcb4c704780c8467ae0f31fce3327ce
Showing 65 changed files with 276 additions and 276 deletions
......@@ -28,47 +28,47 @@ public interface IntentMetricsService {
*
* @return the last saved intent events
*/
public List<IntentEvent> getEvents();
List<IntentEvent> getEvents();
/**
* Gets the Event Metric for the intent INSTALL_REQ events.
*
* @return the Event Metric for the intent INSTALL_REQ events
*/
public EventMetric intentSubmittedEventMetric();
EventMetric intentSubmittedEventMetric();
/**
* Gets the Event Metric for the intent INSTALLED events.
*
* @return the Event Metric for the intent INSTALLED events
*/
public EventMetric intentInstalledEventMetric();
EventMetric intentInstalledEventMetric();
/**
* Gets the Event Metric for the intent FAILED events.
*
* @return the Event Metric for the intent FAILED events
*/
public EventMetric intentFailedEventMetric();
EventMetric intentFailedEventMetric();
/**
* Gets the Event Metric for the intent WITHDRAW_REQ events.
*
* @return the Event Metric for the intent WITHDRAW_REQ events
*/
public EventMetric intentWithdrawRequestedEventMetric();
EventMetric intentWithdrawRequestedEventMetric();
/**
* Gets the Event Metric for the intent WITHDRAWN events.
*
* @return the Event Metric for the intent WITHDRAWN events
*/
public EventMetric intentWithdrawnEventMetric();
EventMetric intentWithdrawnEventMetric();
/**
* Gets the Event Metric for the intent PURGED events.
*
* @return the Event Metric for the intent PURGED events
*/
public EventMetric intentPurgedEventMetric();
EventMetric intentPurgedEventMetric();
}
......
......@@ -28,40 +28,40 @@ public interface TopologyMetricsService {
*
* @return the last saved topology events
*/
public List<Event> getEvents();
List<Event> getEvents();
/**
* Gets the Event Metric for the Device Events.
*
* @return the Event Metric for the Device Events
*/
public EventMetric topologyDeviceEventMetric();
EventMetric topologyDeviceEventMetric();
/**
* Gets the Event Metric for the Host Events.
*
* @return the Event Metric for the Host Events
*/
public EventMetric topologyHostEventMetric();
EventMetric topologyHostEventMetric();
/**
* Gets the Event Metric for the Link Events.
*
* @return the Event Metric for the Link Events
*/
public EventMetric topologyLinkEventMetric();
EventMetric topologyLinkEventMetric();
/**
* Gets the Event Metric for the Topology Graph Events.
*
* @return the Event Metric for the Topology Graph Events
*/
public EventMetric topologyGraphEventMetric();
EventMetric topologyGraphEventMetric();
/**
* Gets the Event Metric for the Topology Graph Reasons Events.
*
* @return the Event Metric for the Topology Graph Reasons Events
*/
public EventMetric topologyGraphReasonsEventMetric();
EventMetric topologyGraphReasonsEventMetric();
}
......
......@@ -26,5 +26,5 @@ public interface RouteListener {
*
* @param routeUpdates the collection with updated route information
*/
public void update(Collection<RouteUpdate> routeUpdates);
void update(Collection<RouteUpdate> routeUpdates);
}
......
......@@ -29,7 +29,7 @@ public interface RoutingService {
/**
* Specifies the type of an IP address or an IP prefix location.
*/
public static enum LocationType {
static enum LocationType {
/**
* The location of an IP address or an IP prefix is in local SDN network.
*/
......@@ -50,7 +50,7 @@ public interface RoutingService {
* We classify traffic by the first packet of each traffic.
* </p>
*/
public enum TrafficType {
enum TrafficType {
/**
* Traffic from a host located in local SDN network wants to
* communicate with destination host located in Internet (outside
......@@ -86,14 +86,14 @@ public interface RoutingService {
/**
* Starts the routing service.
*/
public void start();
void start();
/**
* Adds FIB listener.
*
* @param fibListener listener to send FIB updates to
*/
public void addFibListener(FibListener fibListener);
void addFibListener(FibListener fibListener);
/**
* Adds intent creation and submission listener.
......@@ -101,27 +101,27 @@ public interface RoutingService {
* @param intentRequestListener listener to send intent creation and
* submission request to
*/
public void addIntentRequestListener(IntentRequestListener
void addIntentRequestListener(IntentRequestListener
intentRequestListener);
/**
* Stops the routing service.
*/
public void stop();
void stop();
/**
* Gets all IPv4 routes known to SDN-IP.
*
* @return the SDN-IP IPv4 routes
*/
public Collection<RouteEntry> getRoutes4();
Collection<RouteEntry> getRoutes4();
/**
* Gets all IPv6 routes known to SDN-IP.
*
* @return the SDN-IP IPv6 routes
*/
public Collection<RouteEntry> getRoutes6();
Collection<RouteEntry> getRoutes6();
/**
* Evaluates the location of an IP address and returns the location type.
......@@ -129,7 +129,7 @@ public interface RoutingService {
* @param ipAddress the IP address to evaluate
* @return the IP address location type
*/
public LocationType getLocationType(IpAddress ipAddress);
LocationType getLocationType(IpAddress ipAddress);
/**
* Finds out the route entry which has the longest matchable IP prefix.
......@@ -138,7 +138,7 @@ public interface RoutingService {
* @return a route entry which has the longest matchable IP prefix if
* found, otherwise null
*/
public RouteEntry getLongestMatchableRouteEntry(IpAddress ipAddress);
RouteEntry getLongestMatchableRouteEntry(IpAddress ipAddress);
/**
* Finds out the egress connect point where to emit the first packet
......@@ -147,7 +147,7 @@ public interface RoutingService {
* @param dstIpAddress the destination IP address
* @return the egress connect point if found, otherwise null
*/
public ConnectPoint getEgressConnectPoint(IpAddress dstIpAddress);
ConnectPoint getEgressConnectPoint(IpAddress dstIpAddress);
/**
* Routes packet reactively.
......@@ -157,7 +157,7 @@ public interface RoutingService {
* @param srcConnectPoint the connect point where a packet comes from
* @param srcMacAddress the source MAC address of a packet
*/
public void packetReactiveProcessor(IpAddress dstIpAddress,
void packetReactiveProcessor(IpAddress dstIpAddress,
IpAddress srcIpAddress,
ConnectPoint srcConnectPoint,
MacAddress srcMacAddress);
......
......@@ -33,21 +33,21 @@ public interface RoutingConfigurationService {
*
* @return the map of BGP speaker names to BGP speaker objects
*/
public Map<String, BgpSpeaker> getBgpSpeakers();
Map<String, BgpSpeaker> getBgpSpeakers();
/**
* Gets the list of configured BGP peers.
*
* @return the map from peer IP address to BgpPeer object
*/
public Map<IpAddress, BgpPeer> getBgpPeers();
Map<IpAddress, BgpPeer> getBgpPeers();
/**
* Gets the MAC address configured for virtual gateway in SDN network.
*
* @return the MAC address of virtual gateway
*/
public MacAddress getVirtualGatewayMacAddress();
MacAddress getVirtualGatewayMacAddress();
/**
* Evaluates whether an IP address is a virtual gateway IP address.
......@@ -55,7 +55,7 @@ public interface RoutingConfigurationService {
* @param ipAddress the IP address to evaluate
* @return true if the IP address is a virtual gateway address, otherwise false
*/
public boolean isVirtualGatewayIpAddress(IpAddress ipAddress);
boolean isVirtualGatewayIpAddress(IpAddress ipAddress);
/**
* Evaluates whether an IP address belongs to local SDN network.
......@@ -63,7 +63,7 @@ public interface RoutingConfigurationService {
* @param ipAddress the IP address to evaluate
* @return true if the IP address belongs to local SDN network, otherwise false
*/
public boolean isIpAddressLocal(IpAddress ipAddress);
boolean isIpAddressLocal(IpAddress ipAddress);
/**
* Evaluates whether an IP prefix belongs to local SDN network.
......@@ -71,7 +71,7 @@ public interface RoutingConfigurationService {
* @param ipPrefix the IP prefix to evaluate
* @return true if the IP prefix belongs to local SDN network, otherwise false
*/
public boolean isIpPrefixLocal(IpPrefix ipPrefix);
boolean isIpPrefixLocal(IpPrefix ipPrefix);
/**
* Retrieves the entire set of interfaces in the network.
......
......@@ -27,19 +27,19 @@ public interface BgpInfoService {
*
* @return the BGP sessions
*/
public Collection<BgpSession> getBgpSessions();
Collection<BgpSession> getBgpSessions();
/**
* Gets the selected IPv4 BGP routes among all BGP sessions.
*
* @return the selected IPv4 BGP routes among all BGP sessions
*/
public Collection<BgpRouteEntry> getBgpRoutes4();
Collection<BgpRouteEntry> getBgpRoutes4();
/**
* Gets the selected IPv6 BGP routes among all BGP sessions.
*
* @return the selected IPv6 BGP routes among all BGP sessions
*/
public Collection<BgpRouteEntry> getBgpRoutes6();
Collection<BgpRouteEntry> getBgpRoutes6();
}
......
......@@ -26,6 +26,6 @@ public interface SdnIpService {
*
* @param isPrimary true if the instance is primary, false if it is not
*/
public void modifyPrimary(boolean isPrimary);
void modifyPrimary(boolean isPrimary);
}
......
......@@ -23,7 +23,7 @@ public interface NetworkConfigService {
* Suggests the action to be taken by the caller given the configuration
* associated with the queried network-object (eg. switch, link etc.).
*/
public enum NetworkConfigState {
enum NetworkConfigState {
/**
* Associated network object has been configured to not be allowed in
* the network.
......@@ -49,7 +49,7 @@ public interface NetworkConfigService {
* parameters to the caller, in response to a query for the configuration
* associated with a switch.
*/
public class SwitchConfigStatus {
class SwitchConfigStatus {
private NetworkConfigState configState;
private SwitchConfig switchConfig;
private String msg;
......@@ -107,7 +107,7 @@ public interface NetworkConfigService {
* parameters to the caller, in response to a query for the configuration
* associated with a link.
*/
public class LinkConfigStatus {
class LinkConfigStatus {
private NetworkConfigState configState;
private LinkConfig linkConfig;
private String msg;
......@@ -169,7 +169,7 @@ public interface NetworkConfigService {
* @param dpid device id of the switch to be queried
* @return SwitchConfigStatus with outcome of check and associated config.
*/
public SwitchConfigStatus checkSwitchConfig(DeviceId dpid);
SwitchConfigStatus checkSwitchConfig(DeviceId dpid);
/**
* Reserved for future use.
......@@ -193,7 +193,7 @@ public interface NetworkConfigService {
* @param linkTuple unidirectional link to be queried
* @return LinkConfigStatus with outcome of check and associated config.
*/
public LinkConfigStatus checkLinkConfig(Link linkTuple);
LinkConfigStatus checkLinkConfig(Link linkTuple);
/**
* Retrieves a list of switches that have been configured, and have been
......@@ -212,7 +212,7 @@ public interface NetworkConfigService {
*
* @return a non-null List of SwitchConfig which may be empty
*/
public List<SwitchConfig> getConfiguredAllowedSwitches();
List<SwitchConfig> getConfiguredAllowedSwitches();
/**
* Reserved for future use.
......@@ -237,7 +237,7 @@ public interface NetworkConfigService {
*
* @return a non-null List of LinkConfig which may be empty
*/
public List<LinkConfig> getConfiguredAllowedLinks();
List<LinkConfig> getConfiguredAllowedLinks();
/**
* Retrieves the Dpid associated with a 'name' for a configured switch
......@@ -248,6 +248,6 @@ public interface NetworkConfigService {
* @return the Dpid corresponding to a given 'name', or null if no
* configured switch was found for the given 'name'.
*/
public DeviceId getDpidForName(String name);
DeviceId getDpidForName(String name);
}
......
......@@ -28,14 +28,14 @@ public interface VbngConfigurationService {
*
* @return the IP address of next hop
*/
public IpAddress getNextHopIpAddress();
IpAddress getNextHopIpAddress();
/**
* Gets the MAC address configured for all the public IP addresses.
*
* @return the MAC address
*/
public MacAddress getPublicFacingMac();
MacAddress getPublicFacingMac();
/**
* Evaluates whether an IP address is an assigned public IP address.
......@@ -44,7 +44,7 @@ public interface VbngConfigurationService {
* @return true if the input IP address is an assigned public IP address,
* otherwise false
*/
public boolean isAssignedPublicIpAddress(IpAddress ipAddress);
boolean isAssignedPublicIpAddress(IpAddress ipAddress);
/**
* Gets an available public IP address from local public IP prefixes.
......@@ -52,7 +52,7 @@ public interface VbngConfigurationService {
* @param privateIpAddress a private IP address
* @return an available public IP address if it exists, otherwise null
*/
public IpAddress getAvailablePublicIpAddress(IpAddress privateIpAddress);
IpAddress getAvailablePublicIpAddress(IpAddress privateIpAddress);
/**
* Gets the public IP address already assigned for a private IP address.
......@@ -60,5 +60,5 @@ public interface VbngConfigurationService {
* @param privateIpAddress a private IP address
* @return the assigned public IP address if it exists, otherwise null
*/
public IpAddress getAssignedPublicIpAddress(IpAddress privateIpAddress);
IpAddress getAssignedPublicIpAddress(IpAddress privateIpAddress);
}
......
......@@ -34,6 +34,6 @@ public interface VbngService {
* @return the public address if a virtual BGN is successfully created,
* otherwise return null
*/
public IpAddress createVbng(IpAddress privateIpAddress);
IpAddress createVbng(IpAddress privateIpAddress);
}
......
......@@ -27,12 +27,12 @@ public interface CoreService {
/**
* Name of the core "application".
*/
public static final String CORE_APP_NAME = "org.onosproject.core";
static final String CORE_APP_NAME = "org.onosproject.core";
/**
* Identifier of the core "provider".
*/
public static final ProviderId CORE_PROVIDER_ID = new ProviderId("core", CORE_APP_NAME);
static final ProviderId CORE_PROVIDER_ID = new ProviderId("core", CORE_APP_NAME);
/**
* Returns the product version.
......
......@@ -27,7 +27,7 @@ public interface Annotations {
*
* @return annotation keys
*/
public Set<String> keys();
Set<String> keys();
/**
* Returns the value of the specified annotation.
......@@ -35,6 +35,6 @@ public interface Annotations {
* @param key annotation key
* @return annotation value
*/
public String value(String key);
String value(String key);
}
......
......@@ -23,7 +23,7 @@ public interface Link extends Annotated, Provided, NetworkResource {
/**
* Coarse representation of the link type.
*/
public enum Type {
enum Type {
/**
* Signifies that this is a direct single-segment link.
*/
......@@ -59,7 +59,7 @@ public interface Link extends Annotated, Provided, NetworkResource {
* configured durable links, i.e. those that need to remain present,
* but instead be marked as inactive.
*/
public enum State {
enum State {
/**
* Signifies that a link is currently active.
*/
......
......@@ -27,7 +27,7 @@ public interface MutableAnnotations extends Annotations {
* @param value annotation value
* @return self
*/
public MutableAnnotations set(String key, String value);
MutableAnnotations set(String key, String value);
/**
* Clears the specified keys or the all keys if none were specified.
......@@ -35,6 +35,6 @@ public interface MutableAnnotations extends Annotations {
* @param keys keys to be cleared
* @return self
*/
public MutableAnnotations clear(String... keys);
MutableAnnotations clear(String... keys);
}
......
......@@ -22,7 +22,7 @@ package org.onosproject.net;
public interface Port extends Annotated {
/** Represents coarse port type classification. */
public enum Type {
enum Type {
/**
* Signifies copper-based connectivity.
*/
......
......@@ -30,7 +30,7 @@ public interface SparseAnnotations extends Annotations {
* </p>
*/
@Override
public Set<String> keys();
Set<String> keys();
/**
* Indicates whether the specified key has been tagged as removed. This is
......@@ -39,6 +39,6 @@ public interface SparseAnnotations extends Annotations {
* @param key annotation key
* @return true if the previous annotation has been tagged for removal
*/
public boolean isRemoved(String key);
boolean isRemoved(String key);
}
......
......@@ -30,7 +30,7 @@ public interface DeviceClockProviderService {
* @param deviceId device identifier.
* @return true if timestamp can be issued for specified device
*/
public boolean isTimestampAvailable(DeviceId deviceId);
boolean isTimestampAvailable(DeviceId deviceId);
/**
* Updates the mastership term for the specified deviceId.
......@@ -38,5 +38,5 @@ public interface DeviceClockProviderService {
* @param deviceId device identifier.
* @param term mastership term.
*/
public void setMastershipTerm(DeviceId deviceId, MastershipTerm term);
void setMastershipTerm(DeviceId deviceId, MastershipTerm term);
}
......
......@@ -29,7 +29,7 @@ public interface DeviceClockService {
* @param deviceId device identifier.
* @return true if timestamp can be issued for specified device
*/
public boolean isTimestampAvailable(DeviceId deviceId);
boolean isTimestampAvailable(DeviceId deviceId);
/**
* Returns a new timestamp for the specified deviceId.
......@@ -37,5 +37,5 @@ public interface DeviceClockService {
* @param deviceId device identifier.
* @return timestamp.
*/
public Timestamp getTimestamp(DeviceId deviceId);
Timestamp getTimestamp(DeviceId deviceId);
}
......
......@@ -25,76 +25,76 @@ public interface PortStatistics {
*
* @return port number
*/
public int port();
int port();
/**
* Returns the number of packets received.
*
* @return the number of packets received
*/
public long packetsReceived();
long packetsReceived();
/**
* Returns the number of packets sent.
*
* @return the number of packets sent
*/
public long packetsSent();
long packetsSent();
/**
* Returns the bytes received.
*
* @return the bytes received
*/
public long bytesReceived();
long bytesReceived();
/**
* Returns the bytes sent.
*
* @return the bytes sent
*/
public long bytesSent();
long bytesSent();
/**
* Returns the number of packets dropped by RX.
*
* @return the number of packets dropped by RX
*/
public long packetsRxDropped();
long packetsRxDropped();
/**
* Returns the number of packets dropped by TX.
*
* @return the number of packets dropped by TX
*/
public long packetsTxDropped();
long packetsTxDropped();
/**
* Returns the number of transmit errors.
*
* @return the number of transmit errors
*/
public long packetsRxErrors();
long packetsRxErrors();
/**
* Returns the number of receive errors.
*
* @return the number of receive error
*/
public long packetsTxErrors();
long packetsTxErrors();
/**
* Returns the time port has been alive in seconds.
*
* @return the time port has been alive in seconds
*/
public long durationSec();
long durationSec();
/**
* Returns the time port has been alive in nano seconds.
*
* @return the time port has been alive in nano seconds
*/
public long durationNano();
long durationNano();
}
......
......@@ -23,7 +23,7 @@ package org.onosproject.net.flow;
public interface FlowEntry extends FlowRule {
public enum FlowEntryState {
enum FlowEntryState {
/**
* Indicates that this rule has been submitted for addition.
......
......@@ -34,7 +34,7 @@ public interface FlowRule {
* Default is used.
*/
@Deprecated
public static enum Type {
static enum Type {
/*
* Default type - used in flow rule for single table switch NOTE: this
* setting should not be used as Table 0 in a multi-table pipeline
......@@ -138,7 +138,7 @@ public interface FlowRule {
/**
* A flowrule builder.
*/
public interface Builder {
interface Builder {
/**
* Assigns a cookie value to this flowrule. Mutually exclusive with the
......
......@@ -25,7 +25,7 @@ public interface Criterion {
* Types of fields to which the selection criterion may apply.
*/
// From page 75 of OpenFlow 1.5.0 spec
public enum Type {
enum Type {
/** Switch input port. */
IN_PORT,
/** Switch physical input port. */
......@@ -137,13 +137,13 @@ public interface Criterion {
*
* @return type of criterion
*/
public Type type();
Type type();
/**
* Bit definitions for IPv6 Extension Header pseudo-field.
* From page 79 of OpenFlow 1.5.0 spec.
*/
public enum IPv6ExthdrFlags {
enum IPv6ExthdrFlags {
/** "No next header" encountered. */
NONEXT((short) (1 << 0)),
/** Encrypted Sec Payload header present. */
......
......@@ -45,13 +45,13 @@ public interface FilteringObjective extends Objective {
*
* @return a criterion
*/
public Criterion key();
Criterion key();
/**
* Obtain this filtering type.
* @return the type
*/
public Type type();
Type type();
/**
* The set of conditions the filter must provision at the device.
......@@ -63,7 +63,7 @@ public interface FilteringObjective extends Objective {
/**
* Builder of Filtering objective entities.
*/
public interface Builder extends Objective.Builder {
interface Builder extends Objective.Builder {
/**
* Specify the key for the filter.
......@@ -71,7 +71,7 @@ public interface FilteringObjective extends Objective {
* @param key a criterion
* @return a filter objective builder
*/
public Builder withKey(Criterion key);
Builder withKey(Criterion key);
/**
* Add a filtering condition.
......@@ -79,40 +79,40 @@ public interface FilteringObjective extends Objective {
* @param criterion new criterion
* @return a filtering builder
*/
public Builder addCondition(Criterion criterion);
Builder addCondition(Criterion criterion);
/**
* Permit this filtering condition set.
* @return a filtering builder
*/
public Builder permit();
Builder permit();
/**
* Deny this filtering condition set.
* @return a filtering builder
*/
public Builder deny();
Builder deny();
/**
* Assigns an application id.
* @param appId an application id
* @return a filtering builder
*/
public Builder fromApp(ApplicationId appId);
Builder fromApp(ApplicationId appId);
/**
* Builds the filtering objective that will be added.
*
* @return a filtering objective
*/
public FilteringObjective add();
FilteringObjective add();
/**
* Builds the filtering objective that will be removed.
*
* @return a filtering objective.
*/
public FilteringObjective remove();
FilteringObjective remove();
/**
* Builds the filtering objective that will be added.
......@@ -121,7 +121,7 @@ public interface FilteringObjective extends Objective {
* @param context an objective context
* @return a filtering objective
*/
public FilteringObjective add(ObjectiveContext context);
FilteringObjective add(ObjectiveContext context);
/**
* Builds the filtering objective that will be removed.
......@@ -130,7 +130,7 @@ public interface FilteringObjective extends Objective {
* @param context an objective context
* @return a filtering objective
*/
public FilteringObjective remove(ObjectiveContext context);
FilteringObjective remove(ObjectiveContext context);
}
......
......@@ -74,7 +74,7 @@ public interface ForwardingObjective extends Objective {
/**
* A forwarding objective builder.
*/
public interface Builder extends Objective.Builder {
interface Builder extends Objective.Builder {
/**
* Assigns a selector to the forwarding objective.
......@@ -82,7 +82,7 @@ public interface ForwardingObjective extends Objective {
* @param selector a traffic selector
* @return a forwarding objective builder
*/
public Builder withSelector(TrafficSelector selector);
Builder withSelector(TrafficSelector selector);
/**
* Assigns a next step to the forwarding objective.
......@@ -90,7 +90,7 @@ public interface ForwardingObjective extends Objective {
* @param nextId a next objective id.
* @return a forwarding objective builder
*/
public Builder nextStep(int nextId);
Builder nextStep(int nextId);
/**
* Assigns the treatment for this forwarding objective.
......@@ -98,7 +98,7 @@ public interface ForwardingObjective extends Objective {
* @param treatment a traffic treatment
* @return a forwarding objective
*/
public Builder withTreatment(TrafficTreatment treatment);
Builder withTreatment(TrafficTreatment treatment);
/**
* Assigns the flag to the forwarding objective.
......@@ -106,21 +106,21 @@ public interface ForwardingObjective extends Objective {
* @param flag a flag
* @return a forwarding objective builder
*/
public Builder withFlag(Flag flag);
Builder withFlag(Flag flag);
/**
* Builds the forwarding objective that will be added.
*
* @return a forwarding objective
*/
public ForwardingObjective add();
ForwardingObjective add();
/**
* Builds the forwarding objective that will be removed.
*
* @return a forwarding objective.
*/
public ForwardingObjective remove();
ForwardingObjective remove();
/**
* Builds the forwarding objective that will be added.
......@@ -129,7 +129,7 @@ public interface ForwardingObjective extends Objective {
* @param context an objective context
* @return a forwarding objective
*/
public ForwardingObjective add(ObjectiveContext context);
ForwardingObjective add(ObjectiveContext context);
/**
* Builds the forwarding objective that will be removed.
......@@ -138,6 +138,6 @@ public interface ForwardingObjective extends Objective {
* @param context an objective context
* @return a forwarding objective
*/
public ForwardingObjective remove(ObjectiveContext context);
ForwardingObjective remove(ObjectiveContext context);
}
}
......
......@@ -70,7 +70,7 @@ public interface NextObjective extends Objective {
/**
* A next step builder.
*/
public interface Builder extends Objective.Builder {
interface Builder extends Objective.Builder {
/**
* Specifies the id for this next objective.
......@@ -78,7 +78,7 @@ public interface NextObjective extends Objective {
* @param nextId an integer
* @return a next objective builder
*/
public Builder withId(int nextId);
Builder withId(int nextId);
/**
* Sets the type of next step.
......@@ -86,7 +86,7 @@ public interface NextObjective extends Objective {
* @param type a type
* @return a next step builder
*/
public Builder withType(Type type);
Builder withType(Type type);
/**
* Adds a treatment to this next step.
......@@ -94,24 +94,24 @@ public interface NextObjective extends Objective {
* @param treatment a traffic treatment
* @return a next step builder
*/
public Builder addTreatment(TrafficTreatment treatment);
Builder addTreatment(TrafficTreatment treatment);
@Override
public Builder fromApp(ApplicationId appId);
Builder fromApp(ApplicationId appId);
/**
* Builds the next objective that will be added.
*
* @return a next objective
*/
public NextObjective add();
NextObjective add();
/**
* Builds the next objective that will be removed.
*
* @return a next objective.
*/
public NextObjective remove();
NextObjective remove();
/**
* Builds the next objective that will be added.
......@@ -120,7 +120,7 @@ public interface NextObjective extends Objective {
* @param context an objective context
* @return a next objective
*/
public NextObjective add(ObjectiveContext context);
NextObjective add(ObjectiveContext context);
/**
* Builds the next objective that will be removed.
......@@ -129,7 +129,7 @@ public interface NextObjective extends Objective {
* @param context an objective context
* @return a next objective
*/
public NextObjective remove(ObjectiveContext context);
NextObjective remove(ObjectiveContext context);
}
......
......@@ -96,21 +96,21 @@ public interface Objective {
/**
* An objective builder.
*/
public interface Builder {
interface Builder {
/**
* Makes the filtering objective temporary.
*
* @param timeout a timeout
* @return an objective builder
*/
public Builder makeTemporary(int timeout);
Builder makeTemporary(int timeout);
/**
* Makes the filtering objective permanent.
*
* @return an objective builder
*/
public Builder makePermanent();
Builder makePermanent();
/**
* Specifies the application which applied the filter.
......@@ -118,7 +118,7 @@ public interface Objective {
* @param appId an application id
* @return an objective builder
*/
public Builder fromApp(ApplicationId appId);
Builder fromApp(ApplicationId appId);
/**
* Sets the priority for this objective.
......@@ -126,7 +126,7 @@ public interface Objective {
* @param priority an integer
* @return an objective builder
*/
public Builder withPriority(int priority);
Builder withPriority(int priority);
}
}
......
......@@ -24,7 +24,7 @@ public interface Group extends GroupDescription {
/**
* State of the group object in ONOS.
*/
public enum GroupState {
enum GroupState {
/**
* Group create request is queued as group AUDIT is in progress.
*/
......
......@@ -32,21 +32,21 @@ public interface GroupBucket {
*
* @return GroupType group type
*/
public GroupDescription.Type type();
GroupDescription.Type type();
/**
* Returns list of Traffic instructions that are part of the bucket.
*
* @return TrafficTreatment traffic instruction list
*/
public TrafficTreatment treatment();
TrafficTreatment treatment();
/**
* Returns weight of select group bucket.
*
* @return short weight associated with a bucket
*/
public short weight();
short weight();
/**
* Returns port number used for liveness detection for a
......@@ -54,7 +54,7 @@ public interface GroupBucket {
*
* @return PortNumber port number used for liveness detection
*/
public PortNumber watchPort();
PortNumber watchPort();
/**
* Returns group identifier used for liveness detection for a
......@@ -62,7 +62,7 @@ public interface GroupBucket {
*
* @return GroupId group identifier to be used for liveness detection
*/
public GroupId watchGroup();
GroupId watchGroup();
/**
* Returns the number of packets processed by this group bucket.
......
......@@ -27,7 +27,7 @@ public interface GroupDescription {
/**
* Types of the group supported by ONOS.
*/
public enum Type {
enum Type {
/**
* Load-balancing among different buckets in a group.
*/
......@@ -51,28 +51,28 @@ public interface GroupDescription {
*
* @return GroupType group type
*/
public Type type();
Type type();
/**
* Returns device identifier on which this group object is created.
*
* @return DeviceId device identifier
*/
public DeviceId deviceId();
DeviceId deviceId();
/**
* Returns application identifier that has created this group object.
*
* @return ApplicationId application identifier
*/
public ApplicationId appId();
ApplicationId appId();
/**
* Returns application cookie associated with a group object.
*
* @return GroupKey application cookie
*/
public GroupKey appCookie();
GroupKey appCookie();
/**
* Returns groupId passed in by caller.
......@@ -80,12 +80,12 @@ public interface GroupDescription {
* @return Integer group id passed in by caller. May be null if caller
* passed in null to let groupService determin the group id.
*/
public Integer givenGroupId();
Integer givenGroupId();
/**
* Returns group buckets of a group.
*
* @return GroupBuckets immutable list of group bucket
*/
public GroupBuckets buckets();
GroupBuckets buckets();
}
......
......@@ -27,5 +27,5 @@ public interface GroupKey {
*
* @return byte array
*/
public byte[] key();
byte[] key();
}
......
......@@ -24,7 +24,7 @@ import org.onosproject.store.Store;
*/
public interface GroupStore extends Store<GroupEvent, GroupStoreDelegate> {
public enum UpdateType {
enum UpdateType {
/**
* Modify existing group entry by adding provided information.
*/
......
......@@ -28,5 +28,5 @@ public interface HostClockService {
* @param hostId identifier for the host.
* @return timestamp.
*/
public Timestamp getTimestamp(HostId hostId);
Timestamp getTimestamp(HostId hostId);
}
......
......@@ -35,7 +35,7 @@ public interface HostService {
*
* @return number of end-station hosts
*/
public int getHostCount();
int getHostCount();
/**
* Returns a collection of all end-station hosts.
......
......@@ -28,5 +28,5 @@ public interface IntentClockService {
* @param intentId identifier for the intent.
* @return timestamp
*/
public Timestamp getTimestamp(IntentId intentId);
Timestamp getTimestamp(IntentId intentId);
}
......
......@@ -91,7 +91,7 @@ public interface LinkStore extends Store<LinkEvent, LinkStoreDelegate> {
* @param linkDescription link description
* @return create or update link event, or null if no change resulted
*/
public LinkEvent createOrUpdateLink(ProviderId providerId,
LinkEvent createOrUpdateLink(ProviderId providerId,
LinkDescription linkDescription);
/**
......
......@@ -22,9 +22,9 @@ package org.onosproject.net.packet;
*/
public interface PacketProcessor {
public static final int ADVISOR_MAX = Integer.MAX_VALUE / 3;
public static final int DIRECTOR_MAX = (Integer.MAX_VALUE / 3) * 2;
public static final int OBSERVER_MAX = Integer.MAX_VALUE;
static final int ADVISOR_MAX = Integer.MAX_VALUE / 3;
static final int DIRECTOR_MAX = (Integer.MAX_VALUE / 3) * 2;
static final int OBSERVER_MAX = Integer.MAX_VALUE;
/**
* Processes the inbound packet as specified in the given context.
......
......@@ -28,24 +28,24 @@ public interface PacketRequest {
* Obtain the traffic selector.
* @return a traffic selector
*/
public TrafficSelector selector();
TrafficSelector selector();
/**
* Obtain the priority.
* @return a PacketPriority
*/
public PacketPriority priority();
PacketPriority priority();
/**
* Obtain the application id.
* @return an application id
*/
public ApplicationId appId();
ApplicationId appId();
/**
* Obtain the table type.
* @return a table type
*/
public FlowRule.Type tableType();
FlowRule.Type tableType();
}
......
......@@ -13,11 +13,11 @@ public interface LabelResource extends Annotated, Provided, NetworkResource {
* Returns device id.
* @return DeviceId
*/
public DeviceId deviceId();
DeviceId deviceId();
/**
* Returns labelResource Id.
* @return LabelResourceId
*/
public LabelResourceId labelResourceId();
LabelResourceId labelResourceId();
}
......
......@@ -57,14 +57,14 @@ public interface LinkResourceRequest extends ResourceRequest {
*
* @return self
*/
public Builder addLambdaRequest();
Builder addLambdaRequest();
/**
* Adds MPLS request.
*
* @return self
*/
public Builder addMplsRequest();
Builder addMplsRequest();
/**
* Adds bandwidth request with bandwidth value.
......@@ -72,7 +72,7 @@ public interface LinkResourceRequest extends ResourceRequest {
* @param bandwidth bandwidth value to be requested
* @return self
*/
public Builder addBandwidthRequest(double bandwidth);
Builder addBandwidthRequest(double bandwidth);
/**
* Adds the resources required for a constraint.
......@@ -80,13 +80,13 @@ public interface LinkResourceRequest extends ResourceRequest {
* @param constraint the constraint
* @return self
*/
public Builder addConstraint(Constraint constraint);
Builder addConstraint(Constraint constraint);
/**
* Returns link resource request.
*
* @return link resource request
*/
public LinkResourceRequest build();
LinkResourceRequest build();
}
}
......
......@@ -32,7 +32,7 @@ public interface LinkResources {
/**
* Builder of {@link LinkResources}.
*/
public interface Builder {
interface Builder {
/**
* Adds bandwidth resource.
......@@ -43,7 +43,7 @@ public interface LinkResources {
* @param bandwidth bandwidth value to be added
* @return self
*/
public Builder addBandwidth(double bandwidth);
Builder addBandwidth(double bandwidth);
/**
* Adds lambda resource.
......@@ -51,13 +51,13 @@ public interface LinkResources {
* @param lambda lambda value to be added
* @return self
*/
public Builder addLambda(int lambda);
Builder addLambda(int lambda);
/**
* Builds an immutable link resources.
*
* @return link resources
*/
public LinkResources build();
LinkResources build();
}
}
......
......@@ -31,7 +31,7 @@ import org.onosproject.net.Provided;
public interface Label extends Annotated, Provided, NetworkResource {
/** Represents coarse Label type classification. */
public enum Type {
enum Type {
/**
* Signifies VLAN-based tag.
*/
......@@ -109,4 +109,4 @@ public interface Label extends Annotated, Provided, NetworkResource {
* @return label type
*/
Type type();
}
\ No newline at end of file
}
......
......@@ -33,7 +33,7 @@ public interface Tunnel extends Annotated, Provided, NetworkResource {
/**
* Coarse representation of the Tunnel types.
*/
public enum Type {
enum Type {
/**
* Signifies that this is a L2 tunnel.
*/
......@@ -69,7 +69,7 @@ public interface Tunnel extends Annotated, Provided, NetworkResource {
* Representation of the tunnel state.
*
*/
public enum State {
enum State {
/**
* Signifies that a tunnel is currently in a initialized state.
......
......@@ -88,7 +88,7 @@ public interface TunnelStore extends Store<TunnelEvent, TunnelStoreDelegate> {
* @param tunnel tunnel information
* @return create tunnel event
*/
public TunnelEvent addTunnel(ProviderId providerId,
TunnelEvent addTunnel(ProviderId providerId,
Tunnel tunnel);
/**
......@@ -98,7 +98,7 @@ public interface TunnelStore extends Store<TunnelEvent, TunnelStoreDelegate> {
* @param tunnel tunnel
* @return update tunnel event
*/
public TunnelEvent updateTunnel(ProviderId providerId,
TunnelEvent updateTunnel(ProviderId providerId,
Tunnel tunnel);
/**
......
......@@ -24,5 +24,5 @@ public interface ClusterMessageHandler {
* Handles/Processes the cluster message.
* @param message cluster message.
*/
public void handle(ClusterMessage message);
void handle(ClusterMessage message);
}
......
......@@ -17,7 +17,7 @@ public interface AtomicCounterBuilder {
* @param name name of the atomic counter
* @return this AtomicCounterBuilder
*/
public AtomicCounterBuilder withName(String name);
AtomicCounterBuilder withName(String name);
/**
* Creates this counter on the partition that spans the entire cluster.
......@@ -30,7 +30,7 @@ public interface AtomicCounterBuilder {
* </p>
* @return this AtomicCounterBuilder
*/
public AtomicCounterBuilder withPartitionsDisabled();
AtomicCounterBuilder withPartitionsDisabled();
/**
* Builds a AtomicCounter based on the configuration options
......@@ -39,7 +39,7 @@ public interface AtomicCounterBuilder {
* @return new AtomicCounter
* @throws java.lang.RuntimeException if a mandatory parameter is missing
*/
public AtomicCounter build();
AtomicCounter build();
/**
* Builds a AsyncAtomicCounter based on the configuration options
......@@ -48,5 +48,5 @@ public interface AtomicCounterBuilder {
* @return new AsyncAtomicCounter
* @throws java.lang.RuntimeException if a mandatory parameter is missing
*/
public AsyncAtomicCounter buildAsyncCounter();
AsyncAtomicCounter buildAsyncCounter();
}
......
......@@ -31,5 +31,5 @@ public interface ClockService<T, U> {
* @param object2 Second object to use when generating timestamps
* @return the new timestamp
*/
public Timestamp getTimestamp(T object1, U object2);
Timestamp getTimestamp(T object1, U object2);
}
......
......@@ -21,7 +21,7 @@ public interface ConsistentMapBuilder<K, V> {
* @param name name of the consistent map
* @return this ConsistentMapBuilder
*/
public ConsistentMapBuilder<K, V> withName(String name);
ConsistentMapBuilder<K, V> withName(String name);
/**
* Sets a serializer that can be used to serialize
......@@ -35,7 +35,7 @@ public interface ConsistentMapBuilder<K, V> {
* @param serializer serializer
* @return this ConsistentMapBuilder
*/
public ConsistentMapBuilder<K, V> withSerializer(Serializer serializer);
ConsistentMapBuilder<K, V> withSerializer(Serializer serializer);
/**
* Disables distribution of map entries across multiple database partitions.
......@@ -53,7 +53,7 @@ public interface ConsistentMapBuilder<K, V> {
* </p>
* @return this ConsistentMapBuilder
*/
public ConsistentMapBuilder<K, V> withPartitionsDisabled();
ConsistentMapBuilder<K, V> withPartitionsDisabled();
/**
* Disables map updates.
......@@ -62,7 +62,7 @@ public interface ConsistentMapBuilder<K, V> {
*
* @return this ConsistentMapBuilder
*/
public ConsistentMapBuilder<K, V> withUpdatesDisabled();
ConsistentMapBuilder<K, V> withUpdatesDisabled();
/**
* Builds an consistent map based on the configuration options
......@@ -71,7 +71,7 @@ public interface ConsistentMapBuilder<K, V> {
* @return new consistent map
* @throws java.lang.RuntimeException if a mandatory parameter is missing
*/
public ConsistentMap<K, V> build();
ConsistentMap<K, V> build();
/**
* Builds an async consistent map based on the configuration options
......@@ -80,5 +80,5 @@ public interface ConsistentMapBuilder<K, V> {
* @return new async consistent map
* @throws java.lang.RuntimeException if a mandatory parameter is missing
*/
public AsyncConsistentMap<K, V> buildAsyncMap();
}
\ No newline at end of file
AsyncConsistentMap<K, V> buildAsyncMap();
}
......
......@@ -45,14 +45,14 @@ public interface EventuallyConsistentMap<K, V> {
*
* @return number of key-value mappings
*/
public int size();
int size();
/**
* Returns true if this map is empty.
*
* @return true if this map is empty, otherwise false
*/
public boolean isEmpty();
boolean isEmpty();
/**
* Returns true if the map contains a mapping for the specified key.
......@@ -60,7 +60,7 @@ public interface EventuallyConsistentMap<K, V> {
* @param key the key to check if this map contains
* @return true if this map has a mapping for the key, otherwise false
*/
public boolean containsKey(K key);
boolean containsKey(K key);
/**
* Returns true if the map contains a mapping from any key to the specified
......@@ -69,7 +69,7 @@ public interface EventuallyConsistentMap<K, V> {
* @param value the value to check if this map has a mapping for
* @return true if this map has a mapping to this value, otherwise false
*/
public boolean containsValue(V value);
boolean containsValue(V value);
/**
* Returns the value mapped to the specified key.
......@@ -77,7 +77,7 @@ public interface EventuallyConsistentMap<K, V> {
* @param key the key to look up in this map
* @return the value mapped to the key, or null if no mapping is found
*/
public V get(K key);
V get(K key);
/**
* Associates the specified value to the specified key in this map.
......@@ -94,7 +94,7 @@ public interface EventuallyConsistentMap<K, V> {
* @param key the key to add a mapping for in this map
* @param value the value to associate with the key in this map
*/
public void put(K key, V value);
void put(K key, V value);
/**
* Removes the mapping associated with the specified key from the map.
......@@ -108,7 +108,7 @@ public interface EventuallyConsistentMap<K, V> {
*
* @param key the key to remove the mapping for
*/
public void remove(K key);
void remove(K key);
/**
* Removes the given key-value mapping from the map, if it exists.
......@@ -129,7 +129,7 @@ public interface EventuallyConsistentMap<K, V> {
* @param key the key to remove the mapping for
* @param value the value mapped to the key
*/
public void remove(K key, V value);
void remove(K key, V value);
/**
* Adds mappings for all key-value pairs in the specified map to this map.
......@@ -140,12 +140,12 @@ public interface EventuallyConsistentMap<K, V> {
*
* @param m a map of values to add to this map
*/
public void putAll(Map<? extends K, ? extends V> m);
void putAll(Map<? extends K, ? extends V> m);
/**
* Removes all mappings from this map.
*/
public void clear();
void clear();
/**
* Returns a set of the keys in this map. Changes to the set are not
......@@ -153,7 +153,7 @@ public interface EventuallyConsistentMap<K, V> {
*
* @return set of keys in the map
*/
public Set<K> keySet();
Set<K> keySet();
/**
* Returns a collections of values in this map. Changes to the collection
......@@ -161,7 +161,7 @@ public interface EventuallyConsistentMap<K, V> {
*
* @return collection of values in the map
*/
public Collection<V> values();
Collection<V> values();
/**
* Returns a set of mappings contained in this map. Changes to the set are
......@@ -169,7 +169,7 @@ public interface EventuallyConsistentMap<K, V> {
*
* @return set of key-value mappings in this map
*/
public Set<Map.Entry<K, V>> entrySet();
Set<Map.Entry<K, V>> entrySet();
/**
* Adds the specified listener to the map which will be notified whenever
......@@ -177,7 +177,7 @@ public interface EventuallyConsistentMap<K, V> {
*
* @param listener listener to register for events
*/
public void addListener(EventuallyConsistentMapListener<K, V> listener);
void addListener(EventuallyConsistentMapListener<K, V> listener);
/**
* Removes the specified listener from the map such that it will no longer
......@@ -185,7 +185,7 @@ public interface EventuallyConsistentMap<K, V> {
*
* @param listener listener to deregister for events
*/
public void removeListener(EventuallyConsistentMapListener<K, V> listener);
void removeListener(EventuallyConsistentMapListener<K, V> listener);
/**
* Shuts down the map and breaks communication between different instances.
......@@ -193,5 +193,5 @@ public interface EventuallyConsistentMap<K, V> {
* Calls to any methods on the map subsequent to calling destroy() will
* throw a {@link java.lang.RuntimeException}.
*/
public void destroy();
void destroy();
}
......
......@@ -48,7 +48,7 @@ public interface EventuallyConsistentMapBuilder<K, V> {
* @param name name of the map
* @return this EventuallyConsistentMapBuilder
*/
public EventuallyConsistentMapBuilder<K, V> withName(String name);
EventuallyConsistentMapBuilder<K, V> withName(String name);
/**
* Sets a serializer builder that can be used to create a serializer that
......@@ -62,7 +62,7 @@ public interface EventuallyConsistentMapBuilder<K, V> {
* @param serializerBuilder serializer builder
* @return this EventuallyConsistentMapBuilder
*/
public EventuallyConsistentMapBuilder<K, V> withSerializer(
EventuallyConsistentMapBuilder<K, V> withSerializer(
KryoNamespace.Builder serializerBuilder);
/**
......@@ -83,7 +83,7 @@ public interface EventuallyConsistentMapBuilder<K, V> {
* @param clockService clock service
* @return this EventuallyConsistentMapBuilder
*/
public EventuallyConsistentMapBuilder<K, V> withClockService(
EventuallyConsistentMapBuilder<K, V> withClockService(
ClockService<K, V> clockService);
/**
......@@ -92,7 +92,7 @@ public interface EventuallyConsistentMapBuilder<K, V> {
* @param executor event executor
* @return this EventuallyConsistentMapBuilder
*/
public EventuallyConsistentMapBuilder<K, V> withEventExecutor(
EventuallyConsistentMapBuilder<K, V> withEventExecutor(
ExecutorService executor);
/**
......@@ -101,7 +101,7 @@ public interface EventuallyConsistentMapBuilder<K, V> {
* @param executor event executor
* @return this EventuallyConsistentMapBuilder
*/
public EventuallyConsistentMapBuilder<K, V> withCommunicationExecutor(
EventuallyConsistentMapBuilder<K, V> withCommunicationExecutor(
ExecutorService executor);
/**
......@@ -110,7 +110,7 @@ public interface EventuallyConsistentMapBuilder<K, V> {
* @param executor event executor
* @return this EventuallyConsistentMapBuilder
*/
public EventuallyConsistentMapBuilder<K, V> withBackgroundExecutor(
EventuallyConsistentMapBuilder<K, V> withBackgroundExecutor(
ScheduledExecutorService executor);
/**
......@@ -124,7 +124,7 @@ public interface EventuallyConsistentMapBuilder<K, V> {
* to
* @return this EventuallyConsistentMapBuilder
*/
public EventuallyConsistentMapBuilder<K, V> withPeerUpdateFunction(
EventuallyConsistentMapBuilder<K, V> withPeerUpdateFunction(
BiFunction<K, V, Collection<NodeId>> peerUpdateFunction);
/**
......@@ -137,7 +137,7 @@ public interface EventuallyConsistentMapBuilder<K, V> {
*
* @return this EventuallyConsistentMapBuilder
*/
public EventuallyConsistentMapBuilder<K, V> withTombstonesDisabled();
EventuallyConsistentMapBuilder<K, V> withTombstonesDisabled();
/**
* Configures how often to run the anti-entropy background task.
......@@ -149,7 +149,7 @@ public interface EventuallyConsistentMapBuilder<K, V> {
* @param unit time unit for the period
* @return this EventuallyConsistentMapBuilder
*/
public EventuallyConsistentMapBuilder<K, V> withAntiEntropyPeriod(
EventuallyConsistentMapBuilder<K, V> withAntiEntropyPeriod(
long period, TimeUnit unit);
/**
......@@ -163,7 +163,7 @@ public interface EventuallyConsistentMapBuilder<K, V> {
*
* @return this EventuallyConsistentMapBuilder
*/
public EventuallyConsistentMapBuilder<K, V> withFasterConvergence();
EventuallyConsistentMapBuilder<K, V> withFasterConvergence();
/**
* Configure the map to persist data to disk.
......@@ -173,7 +173,7 @@ public interface EventuallyConsistentMapBuilder<K, V> {
*
* @return this EventuallyConsistentMapBuilder
*/
public EventuallyConsistentMapBuilder<K, V> withPersistence();
EventuallyConsistentMapBuilder<K, V> withPersistence();
/**
* Builds an eventually consistent map based on the configuration options
......@@ -182,5 +182,5 @@ public interface EventuallyConsistentMapBuilder<K, V> {
* @return new eventually consistent map
* @throws java.lang.RuntimeException if a mandatory parameter is missing
*/
public EventuallyConsistentMap<K, V> build();
EventuallyConsistentMap<K, V> build();
}
......
......@@ -26,5 +26,5 @@ public interface EventuallyConsistentMapListener<K, V> {
*
* @param event the event
*/
public void event(EventuallyConsistentMapEvent<K, V> event);
void event(EventuallyConsistentMapEvent<K, V> event);
}
......
......@@ -44,7 +44,7 @@ public interface Serializer {
* @param kryo kryo namespace
* @return Serializer instance
*/
public static Serializer using(KryoNamespace kryo) {
static Serializer using(KryoNamespace kryo) {
return new Serializer() {
@Override
public <T> byte[] encode(T object) {
......@@ -57,4 +57,4 @@ public interface Serializer {
}
};
}
}
\ No newline at end of file
}
......
......@@ -36,7 +36,7 @@ public interface SetBuilder<E> {
* @param name name of the set
* @return this SetBuilder
*/
public SetBuilder<E> withName(String name);
SetBuilder<E> withName(String name);
/**
* Sets a serializer that can be used to serialize
......@@ -50,7 +50,7 @@ public interface SetBuilder<E> {
* @param serializer serializer
* @return this SetBuilder
*/
public SetBuilder<E> withSerializer(Serializer serializer);
SetBuilder<E> withSerializer(Serializer serializer);
/**
* Disables set updates.
......@@ -68,5 +68,5 @@ public interface SetBuilder<E> {
* @return new set
* @throws java.lang.RuntimeException if a mandatory parameter is missing
*/
public Set<E> build();
}
\ No newline at end of file
Set<E> build();
}
......
......@@ -22,7 +22,7 @@ import java.util.List;
*/
public interface Transaction {
public enum State {
enum State {
/**
* Indicates a new transaction that is about to be prepared. All transactions
* start their life in this state.
......@@ -81,7 +81,7 @@ public interface Transaction {
*
* @return true is yes, false otherwise
*/
public default boolean isDone() {
default boolean isDone() {
return state() == State.COMMITTED || state() == State.ROLLEDBACK;
}
......@@ -98,5 +98,5 @@ public interface Transaction {
*
* @return last update time
*/
public long lastUpdated();
}
\ No newline at end of file
long lastUpdated();
}
......
......@@ -19,7 +19,7 @@ public interface TransactionContextBuilder {
*
* @return this TransactionalContextBuilder
*/
public TransactionContextBuilder withPartitionsDisabled();
TransactionContextBuilder withPartitionsDisabled();
/**
* Builds a TransactionContext based on configuration options supplied to this
......@@ -28,5 +28,5 @@ public interface TransactionContextBuilder {
* @return a new TransactionalContext
* @throws java.lang.RuntimeException if a mandatory parameter is missing
*/
public TransactionContext build();
TransactionContext build();
}
......
......@@ -47,7 +47,7 @@ public interface ObjectiveTrackerService {
* @param resources resources to track
*/
// TODO consider using the IntentData here rather than just the key
public void addTrackedResources(Key intentKey,
void addTrackedResources(Key intentKey,
Collection<NetworkResource> resources);
/**
......@@ -56,7 +56,7 @@ public interface ObjectiveTrackerService {
* @param intentKey intent identity on whose behalf the path is being tracked
* @param resources resources to stop tracking
*/
public void removeTrackedResources(Key intentKey,
void removeTrackedResources(Key intentKey,
Collection<NetworkResource> resources);
}
......
......@@ -41,7 +41,7 @@ public interface DatabaseState<K, V> {
* @param context The map state context.
*/
@Initializer
public void init(StateContext<DatabaseState<K, V>> context);
void init(StateContext<DatabaseState<K, V>> context);
@Query
Set<String> tableNames();
......
......@@ -31,7 +31,7 @@ public interface StoreSerializer {
* @param obj object to be serialized
* @return serialized bytes
*/
public byte[] encode(final Object obj);
byte[] encode(final Object obj);
/**
* Serializes the specified object into bytes.
......@@ -39,7 +39,7 @@ public interface StoreSerializer {
* @param obj object to be serialized
* @param buffer to write serialized bytes
*/
public void encode(final Object obj, ByteBuffer buffer);
void encode(final Object obj, ByteBuffer buffer);
/**
* Serializes the specified object into bytes.
......@@ -47,7 +47,7 @@ public interface StoreSerializer {
* @param obj object to be serialized
* @param stream to write serialized bytes
*/
public void encode(final Object obj, final OutputStream stream);
void encode(final Object obj, final OutputStream stream);
/**
* Deserializes the specified bytes into an object.
......@@ -56,7 +56,7 @@ public interface StoreSerializer {
* @return deserialized object
* @param <T> decoded type
*/
public <T> T decode(final byte[] bytes);
<T> T decode(final byte[] bytes);
/**
* Deserializes the specified bytes into an object.
......@@ -65,7 +65,7 @@ public interface StoreSerializer {
* @return deserialized object
* @param <T> decoded type
*/
public <T> T decode(final ByteBuffer buffer);
<T> T decode(final ByteBuffer buffer);
/**
* Deserializes the specified bytes into an object.
......@@ -74,5 +74,5 @@ public interface StoreSerializer {
* @return deserialized object
* @param <T> decoded type
*/
public <T> T decode(final InputStream stream);
<T> T decode(final InputStream stream);
}
......
......@@ -34,14 +34,14 @@ public interface OpenFlowAgent {
* @param sw the actual switch object.
* @return true if added, false otherwise.
*/
public boolean addConnectedSwitch(Dpid dpid, OpenFlowSwitch sw);
boolean addConnectedSwitch(Dpid dpid, OpenFlowSwitch sw);
/**
* Checks if the activation for this switch is valid.
* @param dpid the dpid to check
* @return true if valid, false otherwise
*/
public boolean validActivation(Dpid dpid);
boolean validActivation(Dpid dpid);
/**
* Called when a switch is activated, with this controller's role as MASTER.
......@@ -49,7 +49,7 @@ public interface OpenFlowAgent {
* @param sw the actual switch
* @return true if added, false otherwise.
*/
public boolean addActivatedMasterSwitch(Dpid dpid, OpenFlowSwitch sw);
boolean addActivatedMasterSwitch(Dpid dpid, OpenFlowSwitch sw);
/**
* Called when a switch is activated, with this controller's role as EQUAL.
......@@ -57,7 +57,7 @@ public interface OpenFlowAgent {
* @param sw the actual switch
* @return true if added, false otherwise.
*/
public boolean addActivatedEqualSwitch(Dpid dpid, OpenFlowSwitch sw);
boolean addActivatedEqualSwitch(Dpid dpid, OpenFlowSwitch sw);
/**
* Called when this controller's role for a switch transitions from equal
......@@ -65,7 +65,7 @@ public interface OpenFlowAgent {
* 'equal' - so this transition is equivalent to 'addActivatedMasterSwitch'.
* @param dpid the dpid to transistion.
*/
public void transitionToMasterSwitch(Dpid dpid);
void transitionToMasterSwitch(Dpid dpid);
/**
* Called when this controller's role for a switch transitions to equal.
......@@ -73,7 +73,7 @@ public interface OpenFlowAgent {
* 'equal'.
* @param dpid the dpid to transistion.
*/
public void transitionToEqualSwitch(Dpid dpid);
void transitionToEqualSwitch(Dpid dpid);
/**
* Clear all state in controller switch maps for a switch that has
......@@ -81,7 +81,7 @@ public interface OpenFlowAgent {
* that switch from the global repository. Notify switch listeners.
* @param dpid the dpid to remove.
*/
public void removeConnectedSwitch(Dpid dpid);
void removeConnectedSwitch(Dpid dpid);
/**
* Process a message coming from a switch.
......@@ -89,7 +89,7 @@ public interface OpenFlowAgent {
* @param dpid the dpid the message came on.
* @param m the message to process
*/
public void processMessage(Dpid dpid, OFMessage m);
void processMessage(Dpid dpid, OFMessage m);
/**
* Notifies the controller that role assertion has failed.
......@@ -98,5 +98,5 @@ public interface OpenFlowAgent {
* @param requested the role controller requested
* @param response role reply from the switch
*/
public void returnRoleReply(Dpid dpid, RoleState requested, RoleState response);
void returnRoleReply(Dpid dpid, RoleState requested, RoleState response);
}
......
......@@ -40,28 +40,28 @@ public interface OpenFlowSwitchDriver extends OpenFlowSwitch, HandlerBehaviour {
* can only be called once.
* @param agent the agent to set.
*/
public void setAgent(OpenFlowAgent agent);
void setAgent(OpenFlowAgent agent);
/**
* Sets the Role handler object.
* This method can only be called once.
* @param roleHandler the roleHandler class
*/
public void setRoleHandler(RoleHandler roleHandler);
void setRoleHandler(RoleHandler roleHandler);
/**
* Reasserts this controllers role to the switch.
* Useful in cases where the switch no longer agrees
* that this controller has the role it claims.
*/
public void reassertRole();
void reassertRole();
/**
* Handle the situation where the role request triggers an error.
* @param error the error to handle.
* @return true if handled, false if not.
*/
public boolean handleRoleError(OFErrorMsg error);
boolean handleRoleError(OFErrorMsg error);
/**
* If this driver know of Nicira style role messages, these should
......@@ -70,7 +70,7 @@ public interface OpenFlowSwitchDriver extends OpenFlowSwitch, HandlerBehaviour {
* @throws SwitchStateException if the message received was
* not a nicira role or was malformed.
*/
public void handleNiciraRole(OFMessage m) throws SwitchStateException;
void handleNiciraRole(OFMessage m) throws SwitchStateException;
/**
* Handle OF 1.x (where x &gt; 0) role messages.
......@@ -78,98 +78,98 @@ public interface OpenFlowSwitchDriver extends OpenFlowSwitch, HandlerBehaviour {
* @throws SwitchStateException if the message received was
* not a nicira role or was malformed.
*/
public void handleRole(OFMessage m) throws SwitchStateException;
void handleRole(OFMessage m) throws SwitchStateException;
/**
* Announce to the OpenFlow agent that this switch has connected.
* @return true if successful, false if duplicate switch.
*/
public boolean connectSwitch();
boolean connectSwitch();
/**
* Activate this MASTER switch-controller relationship in the OF agent.
* @return true is successful, false is switch has not
* connected or is unknown to the system.
*/
public boolean activateMasterSwitch();
boolean activateMasterSwitch();
/**
* Activate this EQUAL switch-controller relationship in the OF agent.
* @return true is successful, false is switch has not
* connected or is unknown to the system.
*/
public boolean activateEqualSwitch();
boolean activateEqualSwitch();
/**
* Transition this switch-controller relationship to an EQUAL state.
*/
public void transitionToEqualSwitch();
void transitionToEqualSwitch();
/**
* Transition this switch-controller relationship to an Master state.
*/
public void transitionToMasterSwitch();
void transitionToMasterSwitch();
/**
* Remove this switch from the openflow agent.
*/
public void removeConnectedSwitch();
void removeConnectedSwitch();
/**
* Sets the ports on this switch.
* @param portDescReply the port set and descriptions
*/
public void setPortDescReply(OFPortDescStatsReply portDescReply);
void setPortDescReply(OFPortDescStatsReply portDescReply);
/**
* Sets the ports on this switch.
* @param portDescReplies list of port set and descriptions
*/
public void setPortDescReplies(List<OFPortDescStatsReply> portDescReplies);
void setPortDescReplies(List<OFPortDescStatsReply> portDescReplies);
/**
* Sets the features reply for this switch.
* @param featuresReply the features to set.
*/
public void setFeaturesReply(OFFeaturesReply featuresReply);
void setFeaturesReply(OFFeaturesReply featuresReply);
/**
* Sets the switch description.
* @param desc the descriptions
*/
public void setSwitchDescription(OFDescStatsReply desc);
void setSwitchDescription(OFDescStatsReply desc);
/**
* Gets the next transaction id to use.
* @return the xid
*/
public int getNextTransactionId();
int getNextTransactionId();
/**
* Sets the OF version for this switch.
* @param ofV the version to set.
*/
public void setOFVersion(OFVersion ofV);
void setOFVersion(OFVersion ofV);
/**
* Sets this switch has having a full flowtable.
* @param full true if full, false otherswise.
*/
public void setTableFull(boolean full);
void setTableFull(boolean full);
/**
* Sets the associated Netty channel for this switch.
* @param channel the Netty channel
*/
public void setChannel(Channel channel);
void setChannel(Channel channel);
/**
* Sets whether the switch is connected.
*
* @param connected whether the switch is connected
*/
public void setConnected(boolean connected);
void setConnected(boolean connected);
/**
* Initialises the behaviour.
......
......@@ -34,6 +34,6 @@ public interface OpenFlowSwitchDriverFactory {
* @param ofv the OF version in use
* @return the openflow switch representation.
*/
public OpenFlowSwitchDriver getOFSwitchImpl(Dpid dpid,
OpenFlowSwitchDriver getOFSwitchImpl(Dpid dpid,
OFDescStatsReply desc, OFVersion ofv);
}
......
......@@ -40,7 +40,7 @@ public interface RoleHandler {
* @throws SwitchStateException If the message is a Nicira role reply
* but the numeric role value is unknown.
*/
public RoleState extractNiciraRoleReply(OFExperimenter experimenterMsg)
RoleState extractNiciraRoleReply(OFExperimenter experimenterMsg)
throws SwitchStateException;
/**
......@@ -64,7 +64,7 @@ public interface RoleHandler {
* @return false if and only if the switch does not support role-request
* messages, according to the switch driver; true otherwise.
*/
public boolean sendRoleRequest(RoleState role, RoleRecvStatus exp)
boolean sendRoleRequest(RoleState role, RoleRecvStatus exp)
throws IOException;
/**
......@@ -73,7 +73,7 @@ public interface RoleHandler {
* @return RoleReplyInfo object
* @throws SwitchStateException If unknown role encountered
*/
public RoleReplyInfo extractOFRoleReply(OFRoleReply rrmsg)
RoleReplyInfo extractOFRoleReply(OFRoleReply rrmsg)
throws SwitchStateException;
/**
......@@ -93,7 +93,7 @@ public interface RoleHandler {
* @return result comparing expected and received reply
* @throws SwitchStateException if no request is pending
*/
public RoleRecvStatus deliverRoleReply(RoleReplyInfo rri)
RoleRecvStatus deliverRoleReply(RoleReplyInfo rri)
throws SwitchStateException;
......@@ -108,7 +108,7 @@ public interface RoleHandler {
* @return result comparing expected and received reply
* @throws SwitchStateException if switch did not support requested role
*/
public RoleRecvStatus deliverError(OFErrorMsg error)
RoleRecvStatus deliverError(OFErrorMsg error)
throws SwitchStateException;
}
......
......@@ -26,26 +26,26 @@ import java.util.Set;
*/
public interface GraphPathSearch<V extends Vertex, E extends Edge<V>> {
public static int ALL_PATHS = -1;
static int ALL_PATHS = -1;
/**
* Abstraction of a path search result.
*/
public interface Result<V extends Vertex, E extends Edge<V>> {
interface Result<V extends Vertex, E extends Edge<V>> {
/**
* Returns the search source.
*
* @return search source
*/
public V src();
V src();
/**
* Returns the search destination, if was was given.
*
* @return optional search destination
*/
public V dst();
V dst();
/**
* Returns the set of paths produced as a result of the graph search.
......@@ -59,14 +59,14 @@ public interface GraphPathSearch<V extends Vertex, E extends Edge<V>> {
*
* @return map of vertex to its parent edge bindings
*/
public Map<V, Set<E>> parents();
Map<V, Set<E>> parents();
/**
* Return a bindings of each vertex to its cost in the path.
*
* @return map of vertex to path cost bindings
*/
public Map<V, Double> costs();
Map<V, Double> costs();
}
/**
......
......@@ -26,7 +26,7 @@ public interface GraphSearch<V extends Vertex, E extends Edge<V>> {
/**
* Notion of a graph search result.
*/
public interface Result<V extends Vertex, E extends Edge<V>> {
interface Result<V extends Vertex, E extends Edge<V>> {
}
/**
......
......@@ -26,32 +26,32 @@ public interface IPacket {
*
* @return the payload
*/
public IPacket getPayload();
IPacket getPayload();
/**
*
* @param packet new payload
* @return self
*/
public IPacket setPayload(IPacket packet);
IPacket setPayload(IPacket packet);
/**
*
* @return parent packet
*/
public IPacket getParent();
IPacket getParent();
/**
*
* @param packet new parent
* @return self
*/
public IPacket setParent(IPacket packet);
IPacket setParent(IPacket packet);
/**
* Reset any checksums as needed, and call resetChecksum on all parents.
*/
public void resetChecksum();
void resetChecksum();
/**
* Sets all payloads parent packet if applicable, then serializes this
......@@ -59,7 +59,7 @@ public interface IPacket {
*
* @return a byte[] containing this packet and payloads
*/
public byte[] serialize();
byte[] serialize();
/**
* Deserializes this packet layer and all possible payloads.
......@@ -71,12 +71,12 @@ public interface IPacket {
* length of the data to deserialize
* @return the deserialized data
*/
public IPacket deserialize(byte[] data, int offset, int length);
IPacket deserialize(byte[] data, int offset, int length);
/**
* Clone this packet and its payload packet but not its parent.
*
* @return the clone
*/
public Object clone();
Object clone();
}
......
......@@ -25,7 +25,7 @@ public interface IExtensionHeader {
*
* @return next header
*/
public byte getNextHeader();
byte getNextHeader();
/**
* Sets the type of next header.
......@@ -33,5 +33,5 @@ public interface IExtensionHeader {
* @param nextHeader the next header to set
* @return this
*/
public IExtensionHeader setNextHeader(final byte nextHeader);
IExtensionHeader setNextHeader(final byte nextHeader);
}
......