id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
107,900
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/common/util/PersistenceUtils.java
PersistenceUtils.saveAll
public static void saveAll(final Object obj, final PersistenceStoreType storeType) { try { File file = new File(persistenceStorePath + File.separator + storeType); // create necessary parent directories on file system File directory = file.getParentFile(); if (...
java
public static void saveAll(final Object obj, final PersistenceStoreType storeType) { try { File file = new File(persistenceStorePath + File.separator + storeType); // create necessary parent directories on file system File directory = file.getParentFile(); if (...
[ "public", "static", "void", "saveAll", "(", "final", "Object", "obj", ",", "final", "PersistenceStoreType", "storeType", ")", "{", "try", "{", "File", "file", "=", "new", "File", "(", "persistenceStorePath", "+", "File", ".", "separator", "+", "storeType", "...
Save object to the binary file defined as filename in property "persistence.store.file". @param obj the object to save, which should be serializable @param storeType the store type
[ "Save", "object", "to", "the", "binary", "file", "defined", "as", "filename", "in", "property", "persistence", ".", "store", ".", "file", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/common/util/PersistenceUtils.java#L132-L156
107,901
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/common/util/PersistenceUtils.java
PersistenceUtils.loadAll
public static Object loadAll(final PersistenceStoreType storeType) { Object ret = null; try { File file = new File(persistenceStorePath + File.separator + storeType); log.info("aws-mock: try to load objects from {}", file.getAbsolutePath()); ObjectInputStream in =...
java
public static Object loadAll(final PersistenceStoreType storeType) { Object ret = null; try { File file = new File(persistenceStorePath + File.separator + storeType); log.info("aws-mock: try to load objects from {}", file.getAbsolutePath()); ObjectInputStream in =...
[ "public", "static", "Object", "loadAll", "(", "final", "PersistenceStoreType", "storeType", ")", "{", "Object", "ret", "=", "null", ";", "try", "{", "File", "file", "=", "new", "File", "(", "persistenceStorePath", "+", "File", ".", "separator", "+", "storeTy...
Load object from the binary file defined as filename in property. @param storeType the store type @return the loaded object.
[ "Load", "object", "from", "the", "binary", "file", "defined", "as", "filename", "in", "property", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/common/util/PersistenceUtils.java#L164-L191
107,902
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/ec2/control/MockVolumeController.java
MockVolumeController.createVolume
public MockVolume createVolume( final String volumeType, final String size, final String availabilityZone, final int iops, final String snapshotId) { MockVolume ret = new MockVolume(); ret.setVolumeType(volumeType); ret.setVolumeId( "vol-" + U...
java
public MockVolume createVolume( final String volumeType, final String size, final String availabilityZone, final int iops, final String snapshotId) { MockVolume ret = new MockVolume(); ret.setVolumeType(volumeType); ret.setVolumeId( "vol-" + U...
[ "public", "MockVolume", "createVolume", "(", "final", "String", "volumeType", ",", "final", "String", "size", ",", "final", "String", "availabilityZone", ",", "final", "int", "iops", ",", "final", "String", "snapshotId", ")", "{", "MockVolume", "ret", "=", "ne...
Create the mock Volume. @param volumeType of Volume. @param size : Volume size. @param availabilityZone : Volume availability zone. @param iops : Volume iops count @param snapshotId : Volume's SnapshotId. @return mock Volume.
[ "Create", "the", "mock", "Volume", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/ec2/control/MockVolumeController.java#L84-L100
107,903
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/ec2/control/MockVolumeController.java
MockVolumeController.deleteVolume
public MockVolume deleteVolume(final String volumeId) { if (volumeId != null && allMockVolumes.containsKey(volumeId)) { return allMockVolumes.remove(volumeId); } return null; }
java
public MockVolume deleteVolume(final String volumeId) { if (volumeId != null && allMockVolumes.containsKey(volumeId)) { return allMockVolumes.remove(volumeId); } return null; }
[ "public", "MockVolume", "deleteVolume", "(", "final", "String", "volumeId", ")", "{", "if", "(", "volumeId", "!=", "null", "&&", "allMockVolumes", ".", "containsKey", "(", "volumeId", ")", ")", "{", "return", "allMockVolumes", ".", "remove", "(", "volumeId", ...
Delete Mock Volume. @param volumeId volumeId to be deleted @return Mock volume.
[ "Delete", "Mock", "Volume", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/ec2/control/MockVolumeController.java#L109-L116
107,904
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/common/listener/AppServletContextListener.java
AppServletContextListener.contextInitialized
@Override public final void contextInitialized(final ServletContextEvent sce) { if (persistenceEnabled) { // Load ec2 instances AbstractMockEc2Instance[] instanceArray = (AbstractMockEc2Instance[]) PersistenceUtils .loadAll(PersistenceStoreType.EC2); i...
java
@Override public final void contextInitialized(final ServletContextEvent sce) { if (persistenceEnabled) { // Load ec2 instances AbstractMockEc2Instance[] instanceArray = (AbstractMockEc2Instance[]) PersistenceUtils .loadAll(PersistenceStoreType.EC2); i...
[ "@", "Override", "public", "final", "void", "contextInitialized", "(", "final", "ServletContextEvent", "sce", ")", "{", "if", "(", "persistenceEnabled", ")", "{", "// Load ec2 instances", "AbstractMockEc2Instance", "[", "]", "instanceArray", "=", "(", "AbstractMockEc2...
We load the saved instances if persistence of enabled, on web application starting. @param sce the context event object
[ "We", "load", "the", "saved", "instances", "if", "persistence", "of", "enabled", "on", "web", "application", "starting", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/common/listener/AppServletContextListener.java#L74-L139
107,905
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/common/listener/AppServletContextListener.java
AppServletContextListener.contextDestroyed
@Override public final void contextDestroyed(final ServletContextEvent sce) { Collection<AbstractMockEc2Instance> instances = MockEc2Controller.getInstance() .getAllMockEc2Instances(); for (AbstractMockEc2Instance instance : instances) { // cancel and destroy th...
java
@Override public final void contextDestroyed(final ServletContextEvent sce) { Collection<AbstractMockEc2Instance> instances = MockEc2Controller.getInstance() .getAllMockEc2Instances(); for (AbstractMockEc2Instance instance : instances) { // cancel and destroy th...
[ "@", "Override", "public", "final", "void", "contextDestroyed", "(", "final", "ServletContextEvent", "sce", ")", "{", "Collection", "<", "AbstractMockEc2Instance", ">", "instances", "=", "MockEc2Controller", ".", "getInstance", "(", ")", ".", "getAllMockEc2Instances",...
We save the instances if persistence of enabled, on web application shutting-down. @param sce the context event object
[ "We", "save", "the", "instances", "if", "persistence", "of", "enabled", "on", "web", "application", "shutting", "-", "down", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/common/listener/AppServletContextListener.java#L147-L208
107,906
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/cloudwatch/util/JAXBUtilCW.java
JAXBUtilCW.marshall
public static String marshall(final GetMetricStatisticsResponse obj, final String localPartQName, final String requestVersion) { StringWriter writer = new StringWriter(); try { /*- * call jaxbMarshaller.marshal() synchronized (fixes the issue of * ja...
java
public static String marshall(final GetMetricStatisticsResponse obj, final String localPartQName, final String requestVersion) { StringWriter writer = new StringWriter(); try { /*- * call jaxbMarshaller.marshal() synchronized (fixes the issue of * ja...
[ "public", "static", "String", "marshall", "(", "final", "GetMetricStatisticsResponse", "obj", ",", "final", "String", "localPartQName", ",", "final", "String", "requestVersion", ")", "{", "StringWriter", "writer", "=", "new", "StringWriter", "(", ")", ";", "try", ...
marshall object to string. @param obj GetMetricStatisticsResponse to be serialized and built into xml @param localPartQName local part of the QName @param requestVersion the version of CloudWatch API used by client (aws-sdk, cmd-line tools or other third-party client tools) @return xml representation bound to the given...
[ "marshall", "object", "to", "string", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/cloudwatch/util/JAXBUtilCW.java#L86-L135
107,907
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/ec2/control/MockRouteTableController.java
MockRouteTableController.createRouteTable
public MockRouteTable createRouteTable( final String cidrBlock, final String vpcId) { MockRouteTable ret = new MockRouteTable(); ret.setRouteTableId( "rtb-" + UUID.randomUUID().toString().substring(0, ROUTETABLE_ID_POSTFIX_LENGTH)); ret.setVpcId(vpcId); MockR...
java
public MockRouteTable createRouteTable( final String cidrBlock, final String vpcId) { MockRouteTable ret = new MockRouteTable(); ret.setRouteTableId( "rtb-" + UUID.randomUUID().toString().substring(0, ROUTETABLE_ID_POSTFIX_LENGTH)); ret.setVpcId(vpcId); MockR...
[ "public", "MockRouteTable", "createRouteTable", "(", "final", "String", "cidrBlock", ",", "final", "String", "vpcId", ")", "{", "MockRouteTable", "ret", "=", "new", "MockRouteTable", "(", ")", ";", "ret", ".", "setRouteTableId", "(", "\"rtb-\"", "+", "UUID", "...
Create the mock RouteTable. @param cidrBlock VPC cidr block. @param vpcId vpc Id for RouteTable. @return mock RouteTable.
[ "Create", "the", "mock", "RouteTable", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/ec2/control/MockRouteTableController.java#L83-L101
107,908
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/ec2/control/MockRouteTableController.java
MockRouteTableController.deleteRouteTable
public MockRouteTable deleteRouteTable(final String routetableId) { if (routetableId != null && allMockRouteTables.containsKey(routetableId)) { return allMockRouteTables.remove(routetableId); } return null; }
java
public MockRouteTable deleteRouteTable(final String routetableId) { if (routetableId != null && allMockRouteTables.containsKey(routetableId)) { return allMockRouteTables.remove(routetableId); } return null; }
[ "public", "MockRouteTable", "deleteRouteTable", "(", "final", "String", "routetableId", ")", "{", "if", "(", "routetableId", "!=", "null", "&&", "allMockRouteTables", ".", "containsKey", "(", "routetableId", ")", ")", "{", "return", "allMockRouteTables", ".", "rem...
Delete RouteTable. @param routetableId RouteTableId to be deleted @return Mock RouteTable.
[ "Delete", "RouteTable", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/ec2/control/MockRouteTableController.java#L110-L116
107,909
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/ec2/control/MockRouteTableController.java
MockRouteTableController.createRoute
public MockRoute createRoute( final String destinationCidrBlock, final String internetGatewayId, final String routeTableId) { MockRoute ret = new MockRoute(); ret.setDestinationCidrBlock(destinationCidrBlock); ret.setGatewayId(internetGatewayId); ret.setOrigin("C...
java
public MockRoute createRoute( final String destinationCidrBlock, final String internetGatewayId, final String routeTableId) { MockRoute ret = new MockRoute(); ret.setDestinationCidrBlock(destinationCidrBlock); ret.setGatewayId(internetGatewayId); ret.setOrigin("C...
[ "public", "MockRoute", "createRoute", "(", "final", "String", "destinationCidrBlock", ",", "final", "String", "internetGatewayId", ",", "final", "String", "routeTableId", ")", "{", "MockRoute", "ret", "=", "new", "MockRoute", "(", ")", ";", "ret", ".", "setDesti...
Create the mock Route. @param destinationCidrBlock : Route destinationCidrBlock. @param internetGatewayId : for gateway Id. @param routeTableId : for Route. @return mock Route.
[ "Create", "the", "mock", "Route", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/ec2/control/MockRouteTableController.java#L125-L139
107,910
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/ec2/control/MockRouteTableController.java
MockRouteTableController.getMockRouteTable
public MockRouteTable getMockRouteTable(final String routetableId) { if (routetableId != null) { return allMockRouteTables.get(routetableId); } return null; }
java
public MockRouteTable getMockRouteTable(final String routetableId) { if (routetableId != null) { return allMockRouteTables.get(routetableId); } return null; }
[ "public", "MockRouteTable", "getMockRouteTable", "(", "final", "String", "routetableId", ")", "{", "if", "(", "routetableId", "!=", "null", ")", "{", "return", "allMockRouteTables", ".", "get", "(", "routetableId", ")", ";", "}", "return", "null", ";", "}" ]
Get mock RouteTable instance by RouteTable ID. @param routetableId ID of the mock RouteTable to get @return the mock RouteTable object
[ "Get", "mock", "RouteTable", "instance", "by", "RouteTable", "ID", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/ec2/control/MockRouteTableController.java#L148-L154
107,911
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/ec2/control/MockSecurityGroupController.java
MockSecurityGroupController.createSecurityGroup
public MockSecurityGroup createSecurityGroup( final String groupName, final String groupDescription, final String vpcId) { MockSecurityGroup ret = new MockSecurityGroup(); ret.setGroupName(groupName); ret.setGroupDescription(groupDescription); ret.setGroupId( ...
java
public MockSecurityGroup createSecurityGroup( final String groupName, final String groupDescription, final String vpcId) { MockSecurityGroup ret = new MockSecurityGroup(); ret.setGroupName(groupName); ret.setGroupDescription(groupDescription); ret.setGroupId( ...
[ "public", "MockSecurityGroup", "createSecurityGroup", "(", "final", "String", "groupName", ",", "final", "String", "groupDescription", ",", "final", "String", "vpcId", ")", "{", "MockSecurityGroup", "ret", "=", "new", "MockSecurityGroup", "(", ")", ";", "ret", "."...
Create the mock SecurityGroup. @param groupName group Name. @param groupDescription group Description. @param vpcId vpc Id for Security Group. @return mock Security Group.
[ "Create", "the", "mock", "SecurityGroup", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/ec2/control/MockSecurityGroupController.java#L86-L107
107,912
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/ec2/control/MockSecurityGroupController.java
MockSecurityGroupController.authorizeSecurityGroupIngress
public MockSecurityGroup authorizeSecurityGroupIngress(final String groupId, final String ipProtocol, final Integer fromPort, final Integer toPort, final String cidrIp) { if (groupId == null) { return null; } MockSecurityGroup ret = allMockSecurityGroup.get(groupId); if ...
java
public MockSecurityGroup authorizeSecurityGroupIngress(final String groupId, final String ipProtocol, final Integer fromPort, final Integer toPort, final String cidrIp) { if (groupId == null) { return null; } MockSecurityGroup ret = allMockSecurityGroup.get(groupId); if ...
[ "public", "MockSecurityGroup", "authorizeSecurityGroupIngress", "(", "final", "String", "groupId", ",", "final", "String", "ipProtocol", ",", "final", "Integer", "fromPort", ",", "final", "Integer", "toPort", ",", "final", "String", "cidrIp", ")", "{", "if", "(", ...
Authorize the mock SecurityGroup to Ingress IpProtocol. @param groupId group Id. @param ipProtocol ipProtocol Ingress. @param fromPort fromPort for Security Group. @param toPort toPort for Security Group. @param cidrIp cidrIp for Ingress @return mock Security Group.
[ "Authorize", "the", "mock", "SecurityGroup", "to", "Ingress", "IpProtocol", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/ec2/control/MockSecurityGroupController.java#L118-L138
107,913
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/ec2/control/MockSecurityGroupController.java
MockSecurityGroupController.deleteSecurityGroup
public MockSecurityGroup deleteSecurityGroup(final String securityGroupId) { if (securityGroupId != null && allMockSecurityGroup.containsKey(securityGroupId)) { return allMockSecurityGroup.remove(securityGroupId); } return null; }
java
public MockSecurityGroup deleteSecurityGroup(final String securityGroupId) { if (securityGroupId != null && allMockSecurityGroup.containsKey(securityGroupId)) { return allMockSecurityGroup.remove(securityGroupId); } return null; }
[ "public", "MockSecurityGroup", "deleteSecurityGroup", "(", "final", "String", "securityGroupId", ")", "{", "if", "(", "securityGroupId", "!=", "null", "&&", "allMockSecurityGroup", ".", "containsKey", "(", "securityGroupId", ")", ")", "{", "return", "allMockSecurityGr...
Delete MockSecurityGroup. @param securityGroupId securityGroupId to be deleted @return MockSecurityGroup.
[ "Delete", "MockSecurityGroup", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/ec2/control/MockSecurityGroupController.java#L178-L185
107,914
treelogic-swe/aws-mock
example/java/simple/RunInstancesExample.java
RunInstancesExample.runInstances
public static List<Instance> runInstances(final String imageId, final int runCount) { // pass any credentials as aws-mock does not authenticate them at all AWSCredentials credentials = new BasicAWSCredentials("foo", "bar"); AmazonEC2Client amazonEC2Client = new AmazonEC2Client(credentials); ...
java
public static List<Instance> runInstances(final String imageId, final int runCount) { // pass any credentials as aws-mock does not authenticate them at all AWSCredentials credentials = new BasicAWSCredentials("foo", "bar"); AmazonEC2Client amazonEC2Client = new AmazonEC2Client(credentials); ...
[ "public", "static", "List", "<", "Instance", ">", "runInstances", "(", "final", "String", "imageId", ",", "final", "int", "runCount", ")", "{", "// pass any credentials as aws-mock does not authenticate them at all", "AWSCredentials", "credentials", "=", "new", "BasicAWSC...
Run some new ec2 instances. @param imageId AMI for running new instances from @param runCount count of instances to run @return a list of started instances
[ "Run", "some", "new", "ec2", "instances", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/example/java/simple/RunInstancesExample.java#L35-L56
107,915
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/ec2/control/MockTagsController.java
MockTagsController.createTags
public MockTags createTags( final List<String> resourcesSet, final Map<String, String> tagSet) { MockTags ret = new MockTags(); ret.setResourcesSet(resourcesSet); ret.setTagSet(tagSet); allMockTags.add(ret); return ret; }
java
public MockTags createTags( final List<String> resourcesSet, final Map<String, String> tagSet) { MockTags ret = new MockTags(); ret.setResourcesSet(resourcesSet); ret.setTagSet(tagSet); allMockTags.add(ret); return ret; }
[ "public", "MockTags", "createTags", "(", "final", "List", "<", "String", ">", "resourcesSet", ",", "final", "Map", "<", "String", ",", "String", ">", "tagSet", ")", "{", "MockTags", "ret", "=", "new", "MockTags", "(", ")", ";", "ret", ".", "setResourcesS...
Create the mock Tags. @param resourcesSet List of resourceIds. @param tagSet Map for key, value of tags. @return mock Tags.
[ "Create", "the", "mock", "Tags", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/ec2/control/MockTagsController.java#L74-L83
107,916
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/ec2/control/MockTagsController.java
MockTagsController.deleteTags
public boolean deleteTags(final List<String> resources) { for (MockTags mockTags : allMockTags) { if (mockTags.getResourcesSet().containsAll(resources)) { allMockTags.remove(mockTags); return true; } } return false; }
java
public boolean deleteTags(final List<String> resources) { for (MockTags mockTags : allMockTags) { if (mockTags.getResourcesSet().containsAll(resources)) { allMockTags.remove(mockTags); return true; } } return false; }
[ "public", "boolean", "deleteTags", "(", "final", "List", "<", "String", ">", "resources", ")", "{", "for", "(", "MockTags", "mockTags", ":", "allMockTags", ")", "{", "if", "(", "mockTags", ".", "getResourcesSet", "(", ")", ".", "containsAll", "(", "resourc...
Delete Mock tags. @param resources resources's tags to be deleted @return Mock tags.
[ "Delete", "Mock", "tags", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/ec2/control/MockTagsController.java#L92-L102
107,917
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/common/util/PropertiesUtils.java
PropertiesUtils.getPropertiesByPrefix
public static Set<String> getPropertiesByPrefix(final String propertyNamePrefix) { Set<String> ret = new TreeSet<String>(); Set<Object> keys = properties.keySet(); for (Object key : keys) { if (null != key && key.toString().startsWith(propertyNamePrefix)) { ret.add(p...
java
public static Set<String> getPropertiesByPrefix(final String propertyNamePrefix) { Set<String> ret = new TreeSet<String>(); Set<Object> keys = properties.keySet(); for (Object key : keys) { if (null != key && key.toString().startsWith(propertyNamePrefix)) { ret.add(p...
[ "public", "static", "Set", "<", "String", ">", "getPropertiesByPrefix", "(", "final", "String", "propertyNamePrefix", ")", "{", "Set", "<", "String", ">", "ret", "=", "new", "TreeSet", "<", "String", ">", "(", ")", ";", "Set", "<", "Object", ">", "keys",...
Get a set of properties those share the same given name prefix. @param propertyNamePrefix prefix of name @return the set of values whose property names share the same prefix
[ "Get", "a", "set", "of", "properties", "those", "share", "the", "same", "given", "name", "prefix", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/common/util/PropertiesUtils.java#L105-L116
107,918
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/common/util/PropertiesUtils.java
PropertiesUtils.getIntFromProperty
public static int getIntFromProperty(final String propertyName) { try { return Integer.parseInt(properties.getProperty(propertyName)); } catch (NumberFormatException e) { log.error("NumberFormatException caught during reading property from properties file: " +...
java
public static int getIntFromProperty(final String propertyName) { try { return Integer.parseInt(properties.getProperty(propertyName)); } catch (NumberFormatException e) { log.error("NumberFormatException caught during reading property from properties file: " +...
[ "public", "static", "int", "getIntFromProperty", "(", "final", "String", "propertyName", ")", "{", "try", "{", "return", "Integer", ".", "parseInt", "(", "properties", ".", "getProperty", "(", "propertyName", ")", ")", ";", "}", "catch", "(", "NumberFormatExce...
Get int type of property value by name. @param propertyName name of the property to get @return int type of value
[ "Get", "int", "type", "of", "property", "value", "by", "name", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/common/util/PropertiesUtils.java#L125-L133
107,919
knowm/Sundial
src/main/java/org/knowm/sundial/SundialJobScheduler.java
SundialJobScheduler.startScheduler
public static void startScheduler(int threadPoolSize, String annotatedJobsPackageName) throws SundialSchedulerException { try { createScheduler(threadPoolSize, annotatedJobsPackageName); getScheduler().start(); } catch (SchedulerException e) { throw new SundialSchedulerException(...
java
public static void startScheduler(int threadPoolSize, String annotatedJobsPackageName) throws SundialSchedulerException { try { createScheduler(threadPoolSize, annotatedJobsPackageName); getScheduler().start(); } catch (SchedulerException e) { throw new SundialSchedulerException(...
[ "public", "static", "void", "startScheduler", "(", "int", "threadPoolSize", ",", "String", "annotatedJobsPackageName", ")", "throws", "SundialSchedulerException", "{", "try", "{", "createScheduler", "(", "threadPoolSize", ",", "annotatedJobsPackageName", ")", ";", "getS...
Starts the Sundial Scheduler @param threadPoolSize @param annotatedJobsPackageName A comma(,) or colon(:) can be used to specify multiple packages to scan for Jobs.
[ "Starts", "the", "Sundial", "Scheduler" ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/knowm/sundial/SundialJobScheduler.java#L84-L93
107,920
knowm/Sundial
src/main/java/org/knowm/sundial/SundialJobScheduler.java
SundialJobScheduler.startJob
public static void startJob(String jobName) throws SundialSchedulerException { try { getScheduler().triggerJob(jobName, null); } catch (SchedulerException e) { throw new SundialSchedulerException("ERROR STARTING JOB!!!", e); } }
java
public static void startJob(String jobName) throws SundialSchedulerException { try { getScheduler().triggerJob(jobName, null); } catch (SchedulerException e) { throw new SundialSchedulerException("ERROR STARTING JOB!!!", e); } }
[ "public", "static", "void", "startJob", "(", "String", "jobName", ")", "throws", "SundialSchedulerException", "{", "try", "{", "getScheduler", "(", ")", ".", "triggerJob", "(", "jobName", ",", "null", ")", ";", "}", "catch", "(", "SchedulerException", "e", "...
Starts a Job matching the given Job Name @param jobName
[ "Starts", "a", "Job", "matching", "the", "given", "Job", "Name" ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/knowm/sundial/SundialJobScheduler.java#L271-L278
107,921
knowm/Sundial
src/main/java/org/knowm/sundial/SundialJobScheduler.java
SundialJobScheduler.removeJob
public static void removeJob(String jobName) throws SundialSchedulerException { try { getScheduler().deleteJob(jobName); } catch (SchedulerException e) { throw new SundialSchedulerException("ERROR REMOVING JOB!!!", e); } }
java
public static void removeJob(String jobName) throws SundialSchedulerException { try { getScheduler().deleteJob(jobName); } catch (SchedulerException e) { throw new SundialSchedulerException("ERROR REMOVING JOB!!!", e); } }
[ "public", "static", "void", "removeJob", "(", "String", "jobName", ")", "throws", "SundialSchedulerException", "{", "try", "{", "getScheduler", "(", ")", ".", "deleteJob", "(", "jobName", ")", ";", "}", "catch", "(", "SchedulerException", "e", ")", "{", "thr...
Removes a Job matching the given Job Name @param jobName
[ "Removes", "a", "Job", "matching", "the", "given", "Job", "Name" ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/knowm/sundial/SundialJobScheduler.java#L285-L292
107,922
knowm/Sundial
src/main/java/org/knowm/sundial/SundialJobScheduler.java
SundialJobScheduler.startJob
public static void startJob(String jobName, Map<String, Object> params) throws SundialSchedulerException { try { JobDataMap jobDataMap = new JobDataMap(); for (String key : params.keySet()) { // logger.debug("key= " + key); // logger.debug("value= " + pParams.get(key)); ...
java
public static void startJob(String jobName, Map<String, Object> params) throws SundialSchedulerException { try { JobDataMap jobDataMap = new JobDataMap(); for (String key : params.keySet()) { // logger.debug("key= " + key); // logger.debug("value= " + pParams.get(key)); ...
[ "public", "static", "void", "startJob", "(", "String", "jobName", ",", "Map", "<", "String", ",", "Object", ">", "params", ")", "throws", "SundialSchedulerException", "{", "try", "{", "JobDataMap", "jobDataMap", "=", "new", "JobDataMap", "(", ")", ";", "for"...
Starts a Job matching the the given Job Name found in jobs.xml or jobs manually added. @param jobName
[ "Starts", "a", "Job", "matching", "the", "the", "given", "Job", "Name", "found", "in", "jobs", ".", "xml", "or", "jobs", "manually", "added", "." ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/knowm/sundial/SundialJobScheduler.java#L299-L314
107,923
knowm/Sundial
src/main/java/org/knowm/sundial/SundialJobScheduler.java
SundialJobScheduler.removeTrigger
public static void removeTrigger(String triggerName) throws SundialSchedulerException { try { getScheduler().unscheduleJob(triggerName); } catch (SchedulerException e) { throw new SundialSchedulerException("ERROR REMOVING TRIGGER!!!", e); } }
java
public static void removeTrigger(String triggerName) throws SundialSchedulerException { try { getScheduler().unscheduleJob(triggerName); } catch (SchedulerException e) { throw new SundialSchedulerException("ERROR REMOVING TRIGGER!!!", e); } }
[ "public", "static", "void", "removeTrigger", "(", "String", "triggerName", ")", "throws", "SundialSchedulerException", "{", "try", "{", "getScheduler", "(", ")", ".", "unscheduleJob", "(", "triggerName", ")", ";", "}", "catch", "(", "SchedulerException", "e", ")...
Removes a Trigger matching the the given Trigger Name @param triggerName
[ "Removes", "a", "Trigger", "matching", "the", "the", "given", "Trigger", "Name" ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/knowm/sundial/SundialJobScheduler.java#L490-L497
107,924
knowm/Sundial
src/main/java/org/knowm/sundial/SundialJobScheduler.java
SundialJobScheduler.getAllJobNames
public static List<String> getAllJobNames() throws SundialSchedulerException { List<String> allJobNames = new ArrayList<String>(); try { Set<String> allJobKeys = getScheduler().getJobKeys(); for (String jobKey : allJobKeys) { allJobNames.add(jobKey); } } catch (SchedulerEx...
java
public static List<String> getAllJobNames() throws SundialSchedulerException { List<String> allJobNames = new ArrayList<String>(); try { Set<String> allJobKeys = getScheduler().getJobKeys(); for (String jobKey : allJobKeys) { allJobNames.add(jobKey); } } catch (SchedulerEx...
[ "public", "static", "List", "<", "String", ">", "getAllJobNames", "(", ")", "throws", "SundialSchedulerException", "{", "List", "<", "String", ">", "allJobNames", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "try", "{", "Set", "<", "String",...
Generates an alphabetically sorted List of all Job names in the DEFAULT job group @return
[ "Generates", "an", "alphabetically", "sorted", "List", "of", "all", "Job", "names", "in", "the", "DEFAULT", "job", "group" ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/knowm/sundial/SundialJobScheduler.java#L504-L518
107,925
knowm/Sundial
src/main/java/org/knowm/sundial/SundialJobScheduler.java
SundialJobScheduler.getAllJobsAndTriggers
public static Map<String, List<Trigger>> getAllJobsAndTriggers() throws SundialSchedulerException { Map<String, List<Trigger>> allJobsMap = new TreeMap<String, List<Trigger>>(); try { Set<String> allJobKeys = getScheduler().getJobKeys(); for (String jobKey : allJobKeys) { List<...
java
public static Map<String, List<Trigger>> getAllJobsAndTriggers() throws SundialSchedulerException { Map<String, List<Trigger>> allJobsMap = new TreeMap<String, List<Trigger>>(); try { Set<String> allJobKeys = getScheduler().getJobKeys(); for (String jobKey : allJobKeys) { List<...
[ "public", "static", "Map", "<", "String", ",", "List", "<", "Trigger", ">", ">", "getAllJobsAndTriggers", "(", ")", "throws", "SundialSchedulerException", "{", "Map", "<", "String", ",", "List", "<", "Trigger", ">", ">", "allJobsMap", "=", "new", "TreeMap", ...
Generates a Map of all Job names with corresponding Triggers @return
[ "Generates", "a", "Map", "of", "all", "Job", "names", "with", "corresponding", "Triggers" ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/knowm/sundial/SundialJobScheduler.java#L525-L540
107,926
knowm/Sundial
src/main/java/org/knowm/sundial/SundialJobScheduler.java
SundialJobScheduler.shutdown
public static void shutdown() throws SundialSchedulerException { logger.debug("shutdown() called."); try { getScheduler().shutdown(); scheduler = null; } catch (Exception e) { throw new SundialSchedulerException("COULD NOT SHUTDOWN SCHEDULER!!!", e); } }
java
public static void shutdown() throws SundialSchedulerException { logger.debug("shutdown() called."); try { getScheduler().shutdown(); scheduler = null; } catch (Exception e) { throw new SundialSchedulerException("COULD NOT SHUTDOWN SCHEDULER!!!", e); } }
[ "public", "static", "void", "shutdown", "(", ")", "throws", "SundialSchedulerException", "{", "logger", ".", "debug", "(", "\"shutdown() called.\"", ")", ";", "try", "{", "getScheduler", "(", ")", ".", "shutdown", "(", ")", ";", "scheduler", "=", "null", ";"...
Halts the Scheduler's firing of Triggers, and cleans up all resources associated with the Scheduler.
[ "Halts", "the", "Scheduler", "s", "firing", "of", "Triggers", "and", "cleans", "up", "all", "resources", "associated", "with", "the", "Scheduler", "." ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/knowm/sundial/SundialJobScheduler.java#L565-L575
107,927
knowm/Sundial
src/main/java/org/quartz/plugins/xml/XMLSchedulingDataProcessor.java
XMLSchedulingDataProcessor.initDocumentParser
private void initDocumentParser() throws ParserConfigurationException { DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); docBuilderFactory.setNamespaceAware(false); docBuilderFactory.setValidating(true); docBuilderFactory.setAttribute( "http://java.sun.com/xml/...
java
private void initDocumentParser() throws ParserConfigurationException { DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); docBuilderFactory.setNamespaceAware(false); docBuilderFactory.setValidating(true); docBuilderFactory.setAttribute( "http://java.sun.com/xml/...
[ "private", "void", "initDocumentParser", "(", ")", "throws", "ParserConfigurationException", "{", "DocumentBuilderFactory", "docBuilderFactory", "=", "DocumentBuilderFactory", ".", "newInstance", "(", ")", ";", "docBuilderFactory", ".", "setNamespaceAware", "(", "false", ...
Initializes the XML parser. @throws ParserConfigurationException
[ "Initializes", "the", "XML", "parser", "." ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/quartz/plugins/xml/XMLSchedulingDataProcessor.java#L127-L146
107,928
knowm/Sundial
src/main/java/org/quartz/plugins/xml/XMLSchedulingDataProcessor.java
XMLSchedulingDataProcessor.processFile
public void processFile(String fileName, boolean failOnFileNotFound) throws Exception { boolean fileFound = false; InputStream f = null; try { String furl = null; File file = new File(fileName); // files in filesystem if (!file.exists()) { URL url = classLoadHelper.getResource(fi...
java
public void processFile(String fileName, boolean failOnFileNotFound) throws Exception { boolean fileFound = false; InputStream f = null; try { String furl = null; File file = new File(fileName); // files in filesystem if (!file.exists()) { URL url = classLoadHelper.getResource(fi...
[ "public", "void", "processFile", "(", "String", "fileName", ",", "boolean", "failOnFileNotFound", ")", "throws", "Exception", "{", "boolean", "fileFound", "=", "false", ";", "InputStream", "f", "=", "null", ";", "try", "{", "String", "furl", "=", "null", ";"...
Process the xml file in the given location, and schedule all of the jobs defined within it. @param fileName meta data file name.
[ "Process", "the", "xml", "file", "in", "the", "given", "location", "and", "schedule", "all", "of", "the", "jobs", "defined", "within", "it", "." ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/quartz/plugins/xml/XMLSchedulingDataProcessor.java#L171-L229
107,929
knowm/Sundial
src/main/java/org/quartz/plugins/xml/XMLSchedulingDataProcessor.java
XMLSchedulingDataProcessor.scheduleJobs
public void scheduleJobs(Scheduler sched) throws SchedulerException { List<JobDetail> jobs = new LinkedList<JobDetail>(getLoadedJobs()); List<OperableTrigger> triggers = new LinkedList<OperableTrigger>(getLoadedTriggers()); logger.info("Adding " + jobs.size() + " jobs, " + triggers.size() + " triggers.");...
java
public void scheduleJobs(Scheduler sched) throws SchedulerException { List<JobDetail> jobs = new LinkedList<JobDetail>(getLoadedJobs()); List<OperableTrigger> triggers = new LinkedList<OperableTrigger>(getLoadedTriggers()); logger.info("Adding " + jobs.size() + " jobs, " + triggers.size() + " triggers.");...
[ "public", "void", "scheduleJobs", "(", "Scheduler", "sched", ")", "throws", "SchedulerException", "{", "List", "<", "JobDetail", ">", "jobs", "=", "new", "LinkedList", "<", "JobDetail", ">", "(", "getLoadedJobs", "(", ")", ")", ";", "List", "<", "OperableTri...
Schedules the given sets of jobs and triggers. @param sched job scheduler. @exception SchedulerException if the Job or Trigger cannot be added to the Scheduler, or there is an internal Scheduler error.
[ "Schedules", "the", "given", "sets", "of", "jobs", "and", "triggers", "." ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/quartz/plugins/xml/XMLSchedulingDataProcessor.java#L537-L583
107,930
knowm/Sundial
src/main/java/org/quartz/QuartzScheduler.java
QuartzScheduler.getSchedulerThreadGroup
public ThreadGroup getSchedulerThreadGroup() { if (threadGroup == null) { threadGroup = new ThreadGroup("QuartzScheduler"); if (quartzSchedulerResources.getMakeSchedulerThreadDaemon()) { threadGroup.setDaemon(true); } } return threadGroup; }
java
public ThreadGroup getSchedulerThreadGroup() { if (threadGroup == null) { threadGroup = new ThreadGroup("QuartzScheduler"); if (quartzSchedulerResources.getMakeSchedulerThreadDaemon()) { threadGroup.setDaemon(true); } } return threadGroup; }
[ "public", "ThreadGroup", "getSchedulerThreadGroup", "(", ")", "{", "if", "(", "threadGroup", "==", "null", ")", "{", "threadGroup", "=", "new", "ThreadGroup", "(", "\"QuartzScheduler\"", ")", ";", "if", "(", "quartzSchedulerResources", ".", "getMakeSchedulerThreadDa...
Returns the name of the thread group for Quartz's main threads.
[ "Returns", "the", "name", "of", "the", "thread", "group", "for", "Quartz", "s", "main", "threads", "." ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/quartz/QuartzScheduler.java#L145-L155
107,931
knowm/Sundial
src/main/java/org/knowm/sundial/JobContainer.java
JobContainer.initContextContainer
protected void initContextContainer(JobExecutionContext jobExecutionContext) { JobContext jobContext = new JobContext(); jobContext.addQuartzContext(jobExecutionContext); contextContainer.set(jobContext); }
java
protected void initContextContainer(JobExecutionContext jobExecutionContext) { JobContext jobContext = new JobContext(); jobContext.addQuartzContext(jobExecutionContext); contextContainer.set(jobContext); }
[ "protected", "void", "initContextContainer", "(", "JobExecutionContext", "jobExecutionContext", ")", "{", "JobContext", "jobContext", "=", "new", "JobContext", "(", ")", ";", "jobContext", ".", "addQuartzContext", "(", "jobExecutionContext", ")", ";", "contextContainer"...
Initialize the ThreadLocal with a JobExecutionContext object @param jobExecutionContext
[ "Initialize", "the", "ThreadLocal", "with", "a", "JobExecutionContext", "object" ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/knowm/sundial/JobContainer.java#L25-L30
107,932
knowm/Sundial
src/main/java/org/quartz/core/SimpleThreadPool.java
SimpleThreadPool.shutdown
@Override public void shutdown() { synchronized (nextRunnableLock) { isShutdown = true; if (workers == null) { return; } // signal each worker thread to shut down Iterator<WorkerThread> workerThreads = workers.iterator(); while (workerThreads.hasNext()) { Wor...
java
@Override public void shutdown() { synchronized (nextRunnableLock) { isShutdown = true; if (workers == null) { return; } // signal each worker thread to shut down Iterator<WorkerThread> workerThreads = workers.iterator(); while (workerThreads.hasNext()) { Wor...
[ "@", "Override", "public", "void", "shutdown", "(", ")", "{", "synchronized", "(", "nextRunnableLock", ")", "{", "isShutdown", "=", "true", ";", "if", "(", "workers", "==", "null", ")", "{", "return", ";", "}", "// signal each worker thread to shut down", "Ite...
Terminate any worker threads in this thread group. <p>Jobs currently in progress will complete.
[ "Terminate", "any", "worker", "threads", "in", "this", "thread", "group", "." ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/quartz/core/SimpleThreadPool.java#L231-L258
107,933
knowm/Sundial
src/main/java/org/quartz/core/RAMJobStore.java
RAMJobStore.getTriggersForJob
@Override public List<Trigger> getTriggersForJob(String jobKey) { ArrayList<Trigger> trigList = new ArrayList<Trigger>(); synchronized (lock) { for (int i = 0; i < wrappedTriggers.size(); i++) { TriggerWrapper tw = wrappedTriggers.get(i); if (tw.jobKey.equals(jobKey)) { trigL...
java
@Override public List<Trigger> getTriggersForJob(String jobKey) { ArrayList<Trigger> trigList = new ArrayList<Trigger>(); synchronized (lock) { for (int i = 0; i < wrappedTriggers.size(); i++) { TriggerWrapper tw = wrappedTriggers.get(i); if (tw.jobKey.equals(jobKey)) { trigL...
[ "@", "Override", "public", "List", "<", "Trigger", ">", "getTriggersForJob", "(", "String", "jobKey", ")", "{", "ArrayList", "<", "Trigger", ">", "trigList", "=", "new", "ArrayList", "<", "Trigger", ">", "(", ")", ";", "synchronized", "(", "lock", ")", "...
Get all of the Triggers that are associated to the given Job. <p>If there are no matches, a zero-length array should be returned.
[ "Get", "all", "of", "the", "Triggers", "that", "are", "associated", "to", "the", "given", "Job", "." ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/quartz/core/RAMJobStore.java#L364-L379
107,934
knowm/Sundial
src/main/java/org/quartz/plugins/xml/ValidationException.java
ValidationException.getMessage
@Override public String getMessage() { if (getValidationExceptions().size() == 0) { return super.getMessage(); } StringBuffer sb = new StringBuffer(); boolean first = true; for (Iterator iter = getValidationExceptions().iterator(); iter.hasNext(); ) { Exception e = (Exception) iter...
java
@Override public String getMessage() { if (getValidationExceptions().size() == 0) { return super.getMessage(); } StringBuffer sb = new StringBuffer(); boolean first = true; for (Iterator iter = getValidationExceptions().iterator(); iter.hasNext(); ) { Exception e = (Exception) iter...
[ "@", "Override", "public", "String", "getMessage", "(", ")", "{", "if", "(", "getValidationExceptions", "(", ")", ".", "size", "(", ")", "==", "0", ")", "{", "return", "super", ".", "getMessage", "(", ")", ";", "}", "StringBuffer", "sb", "=", "new", ...
Returns the detail message string. @return the detail message string.
[ "Returns", "the", "detail", "message", "string", "." ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/quartz/plugins/xml/ValidationException.java#L76-L99
107,935
knowm/Sundial
src/main/java/org/knowm/sundial/JobContext.java
JobContext.addQuartzContext
public void addQuartzContext(JobExecutionContext jobExecutionContext) { for (Object mapKey : jobExecutionContext.getMergedJobDataMap().keySet()) { // logger.debug("added key: " + (String) mapKey); // logger.debug("added value: " + (String) // jobExecutionContext.getMergedJobDataMap().get(map...
java
public void addQuartzContext(JobExecutionContext jobExecutionContext) { for (Object mapKey : jobExecutionContext.getMergedJobDataMap().keySet()) { // logger.debug("added key: " + (String) mapKey); // logger.debug("added value: " + (String) // jobExecutionContext.getMergedJobDataMap().get(map...
[ "public", "void", "addQuartzContext", "(", "JobExecutionContext", "jobExecutionContext", ")", "{", "for", "(", "Object", "mapKey", ":", "jobExecutionContext", ".", "getMergedJobDataMap", "(", ")", ".", "keySet", "(", ")", ")", "{", "// logger.debug(\"added key: \" + (...
Add all the mappings from the JobExecutionContext to the JobContext @param jobExecutionContext
[ "Add", "all", "the", "mappings", "from", "the", "JobExecutionContext", "to", "the", "JobContext" ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/knowm/sundial/JobContext.java#L33-L48
107,936
knowm/Sundial
src/main/java/org/knowm/sundial/JobContext.java
JobContext.get
@SuppressWarnings("unchecked") public <T> T get(String key) { T value = (T) map.get(key); return value; }
java
@SuppressWarnings("unchecked") public <T> T get(String key) { T value = (T) map.get(key); return value; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "get", "(", "String", "key", ")", "{", "T", "value", "=", "(", "T", ")", "map", ".", "get", "(", "key", ")", ";", "return", "value", ";", "}" ]
Get a value from a key out of the JobContext @param key @return
[ "Get", "a", "value", "from", "a", "key", "out", "of", "the", "JobContext" ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/knowm/sundial/JobContext.java#L67-L72
107,937
knowm/Sundial
src/main/java/org/knowm/sundial/JobContext.java
JobContext.getRequiredValue
@SuppressWarnings("unchecked") public <T> T getRequiredValue(String key) { T value = (T) map.get(key); if (value == null) { throw new RequiredParameterException(); } return value; }
java
@SuppressWarnings("unchecked") public <T> T getRequiredValue(String key) { T value = (T) map.get(key); if (value == null) { throw new RequiredParameterException(); } return value; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "getRequiredValue", "(", "String", "key", ")", "{", "T", "value", "=", "(", "T", ")", "map", ".", "get", "(", "key", ")", ";", "if", "(", "value", "==", "null", ")", ...
Get a required value from a key out of the Job Context @param key @return
[ "Get", "a", "required", "value", "from", "a", "key", "out", "of", "the", "Job", "Context" ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/knowm/sundial/JobContext.java#L80-L88
107,938
knowm/Sundial
src/main/java/org/quartz/builders/CronTriggerBuilder.java
CronTriggerBuilder.cronTriggerBuilder
public static CronTriggerBuilder cronTriggerBuilder(String cronExpression) throws ParseException { CronExpression.validateExpression(cronExpression); return new CronTriggerBuilder(cronExpression); }
java
public static CronTriggerBuilder cronTriggerBuilder(String cronExpression) throws ParseException { CronExpression.validateExpression(cronExpression); return new CronTriggerBuilder(cronExpression); }
[ "public", "static", "CronTriggerBuilder", "cronTriggerBuilder", "(", "String", "cronExpression", ")", "throws", "ParseException", "{", "CronExpression", ".", "validateExpression", "(", "cronExpression", ")", ";", "return", "new", "CronTriggerBuilder", "(", "cronExpression...
Create a CronScheduleBuilder with the given cron-expression. @param cronExpression the cron expression to base the schedule on. @return the new CronScheduleBuilder @throws ParseException @see CronExpression
[ "Create", "a", "CronScheduleBuilder", "with", "the", "given", "cron", "-", "expression", "." ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/quartz/builders/CronTriggerBuilder.java#L59-L63
107,939
chargebee/chargebee-java
src/main/java/com/chargebee/gdata/UnicodeEscaper.java
UnicodeEscaper.escape
public String escape(String string) { int end = string.length(); int index = nextEscapeIndex(string, 0, end); return index == end ? string : escapeSlow(string, index); }
java
public String escape(String string) { int end = string.length(); int index = nextEscapeIndex(string, 0, end); return index == end ? string : escapeSlow(string, index); }
[ "public", "String", "escape", "(", "String", "string", ")", "{", "int", "end", "=", "string", ".", "length", "(", ")", ";", "int", "index", "=", "nextEscapeIndex", "(", "string", ",", "0", ",", "end", ")", ";", "return", "index", "==", "end", "?", ...
Returns the escaped form of a given literal string. <p>If you are escaping input in arbitrary successive chunks, then it is not generally safe to use this method. If an input string ends with an unmatched high surrogate character, then this method will throw {@link IllegalArgumentException}. You should either ensure y...
[ "Returns", "the", "escaped", "form", "of", "a", "given", "literal", "string", "." ]
0772f9af799492bd94b789a39a8ae56f91d47c05
https://github.com/chargebee/chargebee-java/blob/0772f9af799492bd94b789a39a8ae56f91d47c05/src/main/java/com/chargebee/gdata/UnicodeEscaper.java#L140-L144
107,940
jmock-developers/jmock-library
jmock/src/main/java/org/jmock/lib/concurrent/DeterministicScheduler.java
DeterministicScheduler.tick
public void tick(long duration, TimeUnit timeUnit) { long remaining = toTicks(duration, timeUnit); do { remaining = deltaQueue.tick(remaining); runUntilIdle(); } while (deltaQueue.isNotEmpty() && remaining > 0); }
java
public void tick(long duration, TimeUnit timeUnit) { long remaining = toTicks(duration, timeUnit); do { remaining = deltaQueue.tick(remaining); runUntilIdle(); } while (deltaQueue.isNotEmpty() && remaining > 0); }
[ "public", "void", "tick", "(", "long", "duration", ",", "TimeUnit", "timeUnit", ")", "{", "long", "remaining", "=", "toTicks", "(", "duration", ",", "timeUnit", ")", ";", "do", "{", "remaining", "=", "deltaQueue", ".", "tick", "(", "remaining", ")", ";",...
Runs time forwards by a given duration, executing any commands scheduled for execution during that time period, and any background tasks spawned by the scheduled tasks. Therefore, when a call to tick returns, the executor will be idle. @param duration @param timeUnit
[ "Runs", "time", "forwards", "by", "a", "given", "duration", "executing", "any", "commands", "scheduled", "for", "execution", "during", "that", "time", "period", "and", "any", "background", "tasks", "spawned", "by", "the", "scheduled", "tasks", ".", "Therefore", ...
a6a9d32f3ed0df4a959d3c7421d5f336279b9962
https://github.com/jmock-developers/jmock-library/blob/a6a9d32f3ed0df4a959d3c7421d5f336279b9962/jmock/src/main/java/org/jmock/lib/concurrent/DeterministicScheduler.java#L40-L48
107,941
jmock-developers/jmock-library
jmock/src/main/java/org/jmock/Mockery.java
Mockery.assertIsSatisfied
public void assertIsSatisfied() { if (firstError != null) { throw firstError; } else if (!dispatcher.isSatisfied()) { throw expectationErrorTranslator.translate( ExpectationError.notAllSatisfied(this)); } }
java
public void assertIsSatisfied() { if (firstError != null) { throw firstError; } else if (!dispatcher.isSatisfied()) { throw expectationErrorTranslator.translate( ExpectationError.notAllSatisfied(this)); } }
[ "public", "void", "assertIsSatisfied", "(", ")", "{", "if", "(", "firstError", "!=", "null", ")", "{", "throw", "firstError", ";", "}", "else", "if", "(", "!", "dispatcher", ".", "isSatisfied", "(", ")", ")", "{", "throw", "expectationErrorTranslator", "."...
Fails the test if there are any expectations that have not been met.
[ "Fails", "the", "test", "if", "there", "are", "any", "expectations", "that", "have", "not", "been", "met", "." ]
a6a9d32f3ed0df4a959d3c7421d5f336279b9962
https://github.com/jmock-developers/jmock-library/blob/a6a9d32f3ed0df4a959d3c7421d5f336279b9962/jmock/src/main/java/org/jmock/Mockery.java#L225-L233
107,942
jmock-developers/jmock-library
jmock/src/main/java/org/jmock/lib/script/ScriptedAction.java
ScriptedAction.where
public ScriptedAction where(String name, Object value) { try { interpreter.set(name, value); } catch (EvalError e) { throw new IllegalArgumentException("invalid name binding", e); } return this; }
java
public ScriptedAction where(String name, Object value) { try { interpreter.set(name, value); } catch (EvalError e) { throw new IllegalArgumentException("invalid name binding", e); } return this; }
[ "public", "ScriptedAction", "where", "(", "String", "name", ",", "Object", "value", ")", "{", "try", "{", "interpreter", ".", "set", "(", "name", ",", "value", ")", ";", "}", "catch", "(", "EvalError", "e", ")", "{", "throw", "new", "IllegalArgumentExcep...
Defines a variable that can be referred to by the script. @param name the name of the variable @param value the value of the variable @return the action, so that more variables can be defined if needed
[ "Defines", "a", "variable", "that", "can", "be", "referred", "to", "by", "the", "script", "." ]
a6a9d32f3ed0df4a959d3c7421d5f336279b9962
https://github.com/jmock-developers/jmock-library/blob/a6a9d32f3ed0df4a959d3c7421d5f336279b9962/jmock/src/main/java/org/jmock/lib/script/ScriptedAction.java#L97-L105
107,943
jmock-developers/jmock-library
jmock/src/main/java/org/jmock/internal/InvocationExpectationBuilder.java
InvocationExpectationBuilder.asMockedType
@SuppressWarnings("unchecked") private <T> T asMockedType(@SuppressWarnings("unused") T mockObject, Object capturingImposter) { return (T) capturingImposter; }
java
@SuppressWarnings("unchecked") private <T> T asMockedType(@SuppressWarnings("unused") T mockObject, Object capturingImposter) { return (T) capturingImposter; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "<", "T", ">", "T", "asMockedType", "(", "@", "SuppressWarnings", "(", "\"unused\"", ")", "T", "mockObject", ",", "Object", "capturingImposter", ")", "{", "return", "(", "T", ")", "capturingImposte...
Damn you Java generics! Damn you to HELL!
[ "Damn", "you", "Java", "generics!", "Damn", "you", "to", "HELL!" ]
a6a9d32f3ed0df4a959d3c7421d5f336279b9962
https://github.com/jmock-developers/jmock-library/blob/a6a9d32f3ed0df4a959d3c7421d5f336279b9962/jmock/src/main/java/org/jmock/internal/InvocationExpectationBuilder.java#L77-L82
107,944
Red5/red5-server-common
src/main/java/org/red5/server/so/SharedObject.java
SharedObject.sendUpdates
protected synchronized void sendUpdates() { log.debug("sendUpdates"); // get the current version final int currentVersion = getVersion(); log.debug("Current version: {}", currentVersion); // get the name final String name = getName(); //get owner events ...
java
protected synchronized void sendUpdates() { log.debug("sendUpdates"); // get the current version final int currentVersion = getVersion(); log.debug("Current version: {}", currentVersion); // get the name final String name = getName(); //get owner events ...
[ "protected", "synchronized", "void", "sendUpdates", "(", ")", "{", "log", ".", "debug", "(", "\"sendUpdates\"", ")", ";", "// get the current version\r", "final", "int", "currentVersion", "=", "getVersion", "(", ")", ";", "log", ".", "debug", "(", "\"Current ver...
Send update notification over data channel of RTMP connection
[ "Send", "update", "notification", "over", "data", "channel", "of", "RTMP", "connection" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/so/SharedObject.java#L301-L358
107,945
Red5/red5-server-common
src/main/java/org/red5/server/so/SharedObject.java
SharedObject.notifyModified
protected void notifyModified() { log.debug("notifyModified - modified: {} update counter: {}", modified.get(), updateCounter.get()); if (updateCounter.get() == 0) { if (modified.get()) { // client sent at least one update -> increase version of SO update...
java
protected void notifyModified() { log.debug("notifyModified - modified: {} update counter: {}", modified.get(), updateCounter.get()); if (updateCounter.get() == 0) { if (modified.get()) { // client sent at least one update -> increase version of SO update...
[ "protected", "void", "notifyModified", "(", ")", "{", "log", ".", "debug", "(", "\"notifyModified - modified: {} update counter: {}\"", ",", "modified", ".", "get", "(", ")", ",", "updateCounter", ".", "get", "(", ")", ")", ";", "if", "(", "updateCounter", "."...
Send notification about modification of SO
[ "Send", "notification", "about", "modification", "of", "SO" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/so/SharedObject.java#L363-L377
107,946
Red5/red5-server-common
src/main/java/org/red5/server/so/SharedObject.java
SharedObject.returnAttributeValue
protected void returnAttributeValue(String name) { ownerMessage.addEvent(Type.CLIENT_UPDATE_DATA, name, getAttribute(name)); }
java
protected void returnAttributeValue(String name) { ownerMessage.addEvent(Type.CLIENT_UPDATE_DATA, name, getAttribute(name)); }
[ "protected", "void", "returnAttributeValue", "(", "String", "name", ")", "{", "ownerMessage", ".", "addEvent", "(", "Type", ".", "CLIENT_UPDATE_DATA", ",", "name", ",", "getAttribute", "(", "name", ")", ")", ";", "}" ]
Return an attribute value to the owner. @param name name
[ "Return", "an", "attribute", "value", "to", "the", "owner", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/so/SharedObject.java#L395-L397
107,947
Red5/red5-server-common
src/main/java/org/red5/server/so/SharedObject.java
SharedObject.getAttribute
@Override public Object getAttribute(String name, Object value) { log.debug("getAttribute - name: {} value: {}", name, value); Object result = null; if (name != null) { result = attributes.putIfAbsent(name, value); if (result == null) { // no pr...
java
@Override public Object getAttribute(String name, Object value) { log.debug("getAttribute - name: {} value: {}", name, value); Object result = null; if (name != null) { result = attributes.putIfAbsent(name, value); if (result == null) { // no pr...
[ "@", "Override", "public", "Object", "getAttribute", "(", "String", "name", ",", "Object", "value", ")", "{", "log", ".", "debug", "(", "\"getAttribute - name: {} value: {}\"", ",", "name", ",", "value", ")", ";", "Object", "result", "=", "null", ";", "if", ...
Return attribute by name and set if it doesn't exist yet. @param name Attribute name @param value Value to set if attribute doesn't exist @return Attribute value
[ "Return", "attribute", "by", "name", "and", "set", "if", "it", "doesn", "t", "exist", "yet", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/so/SharedObject.java#L408-L426
107,948
Red5/red5-server-common
src/main/java/org/red5/server/so/SharedObject.java
SharedObject.removeAttribute
@Override public boolean removeAttribute(String name) { boolean result = true; // Send confirmation to client final SharedObjectEvent event = new SharedObjectEvent(Type.CLIENT_DELETE_DATA, name, null); if (ownerMessage.addEvent(event)) { if (super.removeAttribute(na...
java
@Override public boolean removeAttribute(String name) { boolean result = true; // Send confirmation to client final SharedObjectEvent event = new SharedObjectEvent(Type.CLIENT_DELETE_DATA, name, null); if (ownerMessage.addEvent(event)) { if (super.removeAttribute(na...
[ "@", "Override", "public", "boolean", "removeAttribute", "(", "String", "name", ")", "{", "boolean", "result", "=", "true", ";", "// Send confirmation to client\r", "final", "SharedObjectEvent", "event", "=", "new", "SharedObjectEvent", "(", "Type", ".", "CLIENT_DEL...
Removes attribute with given name @param name Attribute @return true if there's such an attribute and it was removed, false otherwise
[ "Removes", "attribute", "with", "given", "name" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/so/SharedObject.java#L490-L506
107,949
Red5/red5-server-common
src/main/java/org/red5/server/so/SharedObject.java
SharedObject.sendMessage
protected void sendMessage(String handler, List<?> arguments) { final SharedObjectEvent event = new SharedObjectEvent(Type.CLIENT_SEND_MESSAGE, handler, arguments); if (ownerMessage.addEvent(event)) { syncEvents.add(event); sendStats.incrementAndGet(); if (log.is...
java
protected void sendMessage(String handler, List<?> arguments) { final SharedObjectEvent event = new SharedObjectEvent(Type.CLIENT_SEND_MESSAGE, handler, arguments); if (ownerMessage.addEvent(event)) { syncEvents.add(event); sendStats.incrementAndGet(); if (log.is...
[ "protected", "void", "sendMessage", "(", "String", "handler", ",", "List", "<", "?", ">", "arguments", ")", "{", "final", "SharedObjectEvent", "event", "=", "new", "SharedObjectEvent", "(", "Type", ".", "CLIENT_SEND_MESSAGE", ",", "handler", ",", "arguments", ...
Broadcast event to event handler @param handler Event handler @param arguments Arguments
[ "Broadcast", "event", "to", "event", "handler" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/so/SharedObject.java#L516-L525
107,950
Red5/red5-server-common
src/main/java/org/red5/server/so/SharedObject.java
SharedObject.register
protected boolean register(IEventListener listener) { log.debug("register - listener: {}", listener); boolean registered = listeners.add(listener); if (registered) { listenerStats.increment(); // prepare response for new client ownerMessage.addEvent(Type...
java
protected boolean register(IEventListener listener) { log.debug("register - listener: {}", listener); boolean registered = listeners.add(listener); if (registered) { listenerStats.increment(); // prepare response for new client ownerMessage.addEvent(Type...
[ "protected", "boolean", "register", "(", "IEventListener", "listener", ")", "{", "log", ".", "debug", "(", "\"register - listener: {}\"", ",", "listener", ")", ";", "boolean", "registered", "=", "listeners", ".", "add", "(", "listener", ")", ";", "if", "(", ...
Register event listener @param listener Event listener @return true if listener was added
[ "Register", "event", "listener" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/so/SharedObject.java#L580-L597
107,951
Red5/red5-server-common
src/main/java/org/red5/server/so/SharedObject.java
SharedObject.unregister
protected void unregister(IEventListener listener) { log.debug("unregister - listener: {}", listener); if (listeners.remove(listener)) { listenerStats.decrement(); } }
java
protected void unregister(IEventListener listener) { log.debug("unregister - listener: {}", listener); if (listeners.remove(listener)) { listenerStats.decrement(); } }
[ "protected", "void", "unregister", "(", "IEventListener", "listener", ")", "{", "log", ".", "debug", "(", "\"unregister - listener: {}\"", ",", "listener", ")", ";", "if", "(", "listeners", ".", "remove", "(", "listener", ")", ")", "{", "listenerStats", ".", ...
Unregister event listener @param listener Event listener
[ "Unregister", "event", "listener" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/so/SharedObject.java#L605-L610
107,952
Red5/red5-server-common
src/main/java/org/red5/server/so/SharedObject.java
SharedObject.checkRelease
protected void checkRelease() { if (!isPersistent() && listeners.isEmpty() && !isAcquired()) { log.info("Deleting shared object {} because all clients disconnected and it is no longer acquired", name); if (storage != null) { if (!storage.remove(this)) { ...
java
protected void checkRelease() { if (!isPersistent() && listeners.isEmpty() && !isAcquired()) { log.info("Deleting shared object {} because all clients disconnected and it is no longer acquired", name); if (storage != null) { if (!storage.remove(this)) { ...
[ "protected", "void", "checkRelease", "(", ")", "{", "if", "(", "!", "isPersistent", "(", ")", "&&", "listeners", ".", "isEmpty", "(", ")", "&&", "!", "isAcquired", "(", ")", ")", "{", "log", ".", "info", "(", "\"Deleting shared object {} because all clients ...
Check if shared object must be released.
[ "Check", "if", "shared", "object", "must", "be", "released", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/so/SharedObject.java#L615-L625
107,953
Red5/red5-server-common
src/main/java/org/red5/server/so/SharedObject.java
SharedObject.beginUpdate
protected void beginUpdate(IEventListener listener) { log.debug("beginUpdate - listener: {}", listener); source = listener; // increase number of pending updates updateCounter.incrementAndGet(); }
java
protected void beginUpdate(IEventListener listener) { log.debug("beginUpdate - listener: {}", listener); source = listener; // increase number of pending updates updateCounter.incrementAndGet(); }
[ "protected", "void", "beginUpdate", "(", "IEventListener", "listener", ")", "{", "log", ".", "debug", "(", "\"beginUpdate - listener: {}\"", ",", "listener", ")", ";", "source", "=", "listener", ";", "// increase number of pending updates\r", "updateCounter", ".", "in...
Begin update of this Shared Object and setting listener @param listener Update with listener
[ "Begin", "update", "of", "this", "Shared", "Object", "and", "setting", "listener" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/so/SharedObject.java#L650-L655
107,954
Red5/red5-server-common
src/main/java/org/red5/server/so/SharedObject.java
SharedObject.clear
protected boolean clear() { log.debug("clear"); super.removeAttributes(); // send confirmation to client ownerMessage.addEvent(Type.CLIENT_CLEAR_DATA, name, null); notifyModified(); changeStats.incrementAndGet(); return true; }
java
protected boolean clear() { log.debug("clear"); super.removeAttributes(); // send confirmation to client ownerMessage.addEvent(Type.CLIENT_CLEAR_DATA, name, null); notifyModified(); changeStats.incrementAndGet(); return true; }
[ "protected", "boolean", "clear", "(", ")", "{", "log", ".", "debug", "(", "\"clear\"", ")", ";", "super", ".", "removeAttributes", "(", ")", ";", "// send confirmation to client\r", "ownerMessage", ".", "addEvent", "(", "Type", ".", "CLIENT_CLEAR_DATA", ",", "...
Deletes all the attributes and sends a clear event to all listeners. The persistent data object is also removed from a persistent shared object. @return true on success, false otherwise
[ "Deletes", "all", "the", "attributes", "and", "sends", "a", "clear", "event", "to", "all", "listeners", ".", "The", "persistent", "data", "object", "is", "also", "removed", "from", "a", "persistent", "shared", "object", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/so/SharedObject.java#L713-L721
107,955
Red5/red5-server-common
src/main/java/org/red5/server/so/SharedObject.java
SharedObject.close
protected void close() { log.debug("close"); closed.compareAndSet(false, true); // clear collections super.removeAttributes(); listeners.clear(); syncEvents.clear(); ownerMessage.getEvents().clear(); }
java
protected void close() { log.debug("close"); closed.compareAndSet(false, true); // clear collections super.removeAttributes(); listeners.clear(); syncEvents.clear(); ownerMessage.getEvents().clear(); }
[ "protected", "void", "close", "(", ")", "{", "log", ".", "debug", "(", "\"close\"", ")", ";", "closed", ".", "compareAndSet", "(", "false", ",", "true", ")", ";", "// clear collections\r", "super", ".", "removeAttributes", "(", ")", ";", "listeners", ".", ...
Detaches a reference from this shared object, reset it's state, this will destroy the reference immediately. This is useful when you don't want to proxy a shared object any longer.
[ "Detaches", "a", "reference", "from", "this", "shared", "object", "reset", "it", "s", "state", "this", "will", "destroy", "the", "reference", "immediately", ".", "This", "is", "useful", "when", "you", "don", "t", "want", "to", "proxy", "a", "shared", "obje...
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/so/SharedObject.java#L727-L735
107,956
Red5/red5-server-common
src/main/java/org/red5/server/ClientRegistry.java
ClientRegistry.addClient
private void addClient(String id, IClient client) { // check to see if the id already exists first if (!hasClient(id)) { clients.put(id, client); } else { log.debug("Client id: {} already registered", id); } }
java
private void addClient(String id, IClient client) { // check to see if the id already exists first if (!hasClient(id)) { clients.put(id, client); } else { log.debug("Client id: {} already registered", id); } }
[ "private", "void", "addClient", "(", "String", "id", ",", "IClient", "client", ")", "{", "// check to see if the id already exists first\r", "if", "(", "!", "hasClient", "(", "id", ")", ")", "{", "clients", ".", "put", "(", "id", ",", "client", ")", ";", "...
Add the client to the registry
[ "Add", "the", "client", "to", "the", "registry" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/ClientRegistry.java#L97-L104
107,957
Red5/red5-server-common
src/main/java/org/red5/server/ClientRegistry.java
ClientRegistry.getClientList
public ClientList<Client> getClientList() { ClientList<Client> list = new ClientList<Client>(); for (IClient c : clients.values()) { list.add((Client) c); } return list; }
java
public ClientList<Client> getClientList() { ClientList<Client> list = new ClientList<Client>(); for (IClient c : clients.values()) { list.add((Client) c); } return list; }
[ "public", "ClientList", "<", "Client", ">", "getClientList", "(", ")", "{", "ClientList", "<", "Client", ">", "list", "=", "new", "ClientList", "<", "Client", ">", "(", ")", ";", "for", "(", "IClient", "c", ":", "clients", ".", "values", "(", ")", ")...
Returns a list of Clients.
[ "Returns", "a", "list", "of", "Clients", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/ClientRegistry.java#L117-L123
107,958
Red5/red5-server-common
src/main/java/org/red5/server/ClientRegistry.java
ClientRegistry.getClients
@SuppressWarnings("unchecked") protected Collection<IClient> getClients() { if (!hasClients()) { // avoid creating new Collection object if no clients exist. return Collections.EMPTY_SET; } return Collections.unmodifiableCollection(clients.values()); }
java
@SuppressWarnings("unchecked") protected Collection<IClient> getClients() { if (!hasClients()) { // avoid creating new Collection object if no clients exist. return Collections.EMPTY_SET; } return Collections.unmodifiableCollection(clients.values()); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "Collection", "<", "IClient", ">", "getClients", "(", ")", "{", "if", "(", "!", "hasClients", "(", ")", ")", "{", "// avoid creating new Collection object if no clients exist.\r", "return", "Collections"...
Return collection of clients @return Collection of clients
[ "Return", "collection", "of", "clients" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/ClientRegistry.java#L147-L154
107,959
Red5/red5-server-common
src/main/java/org/red5/server/ClientRegistry.java
ClientRegistry.newClient
public IClient newClient(Object[] params) throws ClientNotFoundException, ClientRejectedException { // derive client id from the connection params or use next String id = nextId(); IClient client = new Client(id, this); addClient(id, client); return client; }
java
public IClient newClient(Object[] params) throws ClientNotFoundException, ClientRejectedException { // derive client id from the connection params or use next String id = nextId(); IClient client = new Client(id, this); addClient(id, client); return client; }
[ "public", "IClient", "newClient", "(", "Object", "[", "]", "params", ")", "throws", "ClientNotFoundException", ",", "ClientRejectedException", "{", "// derive client id from the connection params or use next\r", "String", "id", "=", "nextId", "(", ")", ";", "IClient", "...
Return client from next id with given params @param params Client params @return Client object @throws ClientNotFoundException if client not found @throws ClientRejectedException if client rejected
[ "Return", "client", "from", "next", "id", "with", "given", "params" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/ClientRegistry.java#L195-L201
107,960
Red5/red5-server-common
src/main/java/org/red5/server/ClientRegistry.java
ClientRegistry.nextId
public String nextId() { String id = "-1"; do { // when we reach max int, reset to zero if (nextId.get() == Integer.MAX_VALUE) { nextId.set(0); } id = String.format("%d", nextId.getAndIncrement()); } while (hasClient(id)); ...
java
public String nextId() { String id = "-1"; do { // when we reach max int, reset to zero if (nextId.get() == Integer.MAX_VALUE) { nextId.set(0); } id = String.format("%d", nextId.getAndIncrement()); } while (hasClient(id)); ...
[ "public", "String", "nextId", "(", ")", "{", "String", "id", "=", "\"-1\"", ";", "do", "{", "// when we reach max int, reset to zero\r", "if", "(", "nextId", ".", "get", "(", ")", "==", "Integer", ".", "MAX_VALUE", ")", "{", "nextId", ".", "set", "(", "0...
Return next client id @return Next client id
[ "Return", "next", "client", "id" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/ClientRegistry.java#L208-L218
107,961
Red5/red5-server-common
src/main/java/org/red5/server/so/SharedObjectService.java
SharedObjectService.getStore
private IPersistenceStore getStore(IScope scope, boolean persistent) { IPersistenceStore store; if (!persistent) { // Use special store for non-persistent shared objects if (!scope.hasAttribute(SO_TRANSIENT_STORE)) { store = new RamPersistence(scope); ...
java
private IPersistenceStore getStore(IScope scope, boolean persistent) { IPersistenceStore store; if (!persistent) { // Use special store for non-persistent shared objects if (!scope.hasAttribute(SO_TRANSIENT_STORE)) { store = new RamPersistence(scope); ...
[ "private", "IPersistenceStore", "getStore", "(", "IScope", "scope", ",", "boolean", "persistent", ")", "{", "IPersistenceStore", "store", ";", "if", "(", "!", "persistent", ")", "{", "// Use special store for non-persistent shared objects\r", "if", "(", "!", "scope", ...
Return scope store @param scope Scope @param persistent Persistent store or not? @return Scope's store
[ "Return", "scope", "store" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/so/SharedObjectService.java#L112-L136
107,962
Red5/red5-server-common
src/main/java/org/red5/server/api/persistence/PersistenceUtils.java
PersistenceUtils.getPersistenceStoreConstructor
private static Constructor<?> getPersistenceStoreConstructor(Class<?> theClass, Class<?>[] interfaces) throws Exception { Constructor<?> constructor = null; for (Class<?> interfaceClass : interfaces) { try { constructor = theClass.getConstructor(new Class[] { interfaceCla...
java
private static Constructor<?> getPersistenceStoreConstructor(Class<?> theClass, Class<?>[] interfaces) throws Exception { Constructor<?> constructor = null; for (Class<?> interfaceClass : interfaces) { try { constructor = theClass.getConstructor(new Class[] { interfaceCla...
[ "private", "static", "Constructor", "<", "?", ">", "getPersistenceStoreConstructor", "(", "Class", "<", "?", ">", "theClass", ",", "Class", "<", "?", ">", "[", "]", "interfaces", ")", "throws", "Exception", "{", "Constructor", "<", "?", ">", "constructor", ...
Returns persistence store object class constructor @param theClass Persistence store class @param interfaces Interfaces that are being implemented by persistence store object class @return Constructor @throws Exception
[ "Returns", "persistence", "store", "object", "class", "constructor" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/api/persistence/PersistenceUtils.java#L43-L60
107,963
Red5/red5-server-common
src/main/java/org/red5/server/net/rtmp/message/ChunkHeader.java
ChunkHeader.read
public static ChunkHeader read(IoBuffer in) { int remaining = in.remaining(); if (remaining > 0) { byte headerByte = in.get(); ChunkHeader h = new ChunkHeader(); // going to check highest 2 bits h.format = (byte) ((0b11000000 & headerByte) >> 6); ...
java
public static ChunkHeader read(IoBuffer in) { int remaining = in.remaining(); if (remaining > 0) { byte headerByte = in.get(); ChunkHeader h = new ChunkHeader(); // going to check highest 2 bits h.format = (byte) ((0b11000000 & headerByte) >> 6); ...
[ "public", "static", "ChunkHeader", "read", "(", "IoBuffer", "in", ")", "{", "int", "remaining", "=", "in", ".", "remaining", "(", ")", ";", "if", "(", "remaining", ">", "0", ")", "{", "byte", "headerByte", "=", "in", ".", "get", "(", ")", ";", "Chu...
Read chunk header from the buffer. @param in buffer @return ChunkHeader instance
[ "Read", "chunk", "header", "from", "the", "buffer", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/rtmp/message/ChunkHeader.java#L121-L164
107,964
Red5/red5-server-common
src/main/java/org/red5/server/stream/consumer/SlicedFileConsumer.java
SlicedFileConsumer.acquireWriteFuture
private boolean acquireWriteFuture(int sliceLength) { if (sliceLength > 0) { Object writeResult = null; // determine a good timeout value based on the slice length to write int timeout = sliceLength * 500; // check for existing future if (writerF...
java
private boolean acquireWriteFuture(int sliceLength) { if (sliceLength > 0) { Object writeResult = null; // determine a good timeout value based on the slice length to write int timeout = sliceLength * 500; // check for existing future if (writerF...
[ "private", "boolean", "acquireWriteFuture", "(", "int", "sliceLength", ")", "{", "if", "(", "sliceLength", ">", "0", ")", "{", "Object", "writeResult", "=", "null", ";", "// determine a good timeout value based on the slice length to write\r", "int", "timeout", "=", "...
Get the WriteFuture with a timeout based on the length of the slice to write. @param sliceLength @return true if successful and false otherwise
[ "Get", "the", "WriteFuture", "with", "a", "timeout", "based", "on", "the", "length", "of", "the", "slice", "to", "write", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/stream/consumer/SlicedFileConsumer.java#L376-L395
107,965
Red5/red5-server-common
src/main/java/org/red5/server/stream/consumer/SlicedFileConsumer.java
SlicedFileConsumer.uninit
public void uninit() { if (initialized.get()) { log.debug("Uninit"); if (writer != null) { if (writerFuture != null) { try { writerFuture.get(); } catch (Exception e) { log.war...
java
public void uninit() { if (initialized.get()) { log.debug("Uninit"); if (writer != null) { if (writerFuture != null) { try { writerFuture.get(); } catch (Exception e) { log.war...
[ "public", "void", "uninit", "(", ")", "{", "if", "(", "initialized", ".", "get", "(", ")", ")", "{", "log", ".", "debug", "(", "\"Uninit\"", ")", ";", "if", "(", "writer", "!=", "null", ")", "{", "if", "(", "writerFuture", "!=", "null", ")", "{",...
Reset or uninitialize
[ "Reset", "or", "uninitialize" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/stream/consumer/SlicedFileConsumer.java#L499-L526
107,966
Red5/red5-server-common
src/main/java/org/red5/server/stream/consumer/SlicedFileConsumer.java
SlicedFileConsumer.doWrites
public final void doWrites() { QueuedMediaData[] slice = null; writeLock.lock(); try { slice = queue.toArray(new QueuedMediaData[0]); if (queue.removeAll(Arrays.asList(slice))) { log.debug("Queued writes transfered, count: {}", slice.length); ...
java
public final void doWrites() { QueuedMediaData[] slice = null; writeLock.lock(); try { slice = queue.toArray(new QueuedMediaData[0]); if (queue.removeAll(Arrays.asList(slice))) { log.debug("Queued writes transfered, count: {}", slice.length); ...
[ "public", "final", "void", "doWrites", "(", ")", "{", "QueuedMediaData", "[", "]", "slice", "=", "null", ";", "writeLock", ".", "lock", "(", ")", ";", "try", "{", "slice", "=", "queue", ".", "toArray", "(", "new", "QueuedMediaData", "[", "0", "]", ")...
Write all the queued items to the writer.
[ "Write", "all", "the", "queued", "items", "to", "the", "writer", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/stream/consumer/SlicedFileConsumer.java#L531-L546
107,967
Red5/red5-server-common
src/main/java/org/red5/server/stream/consumer/SlicedFileConsumer.java
SlicedFileConsumer.doWrites
public final void doWrites(QueuedMediaData[] slice) { // empty the queue for (QueuedMediaData queued : slice) { int tmpTs = queued.getTimestamp(); if (lastWrittenTs <= tmpTs) { if (queued.hasData()) { // write the data ...
java
public final void doWrites(QueuedMediaData[] slice) { // empty the queue for (QueuedMediaData queued : slice) { int tmpTs = queued.getTimestamp(); if (lastWrittenTs <= tmpTs) { if (queued.hasData()) { // write the data ...
[ "public", "final", "void", "doWrites", "(", "QueuedMediaData", "[", "]", "slice", ")", "{", "// empty the queue\r", "for", "(", "QueuedMediaData", "queued", ":", "slice", ")", "{", "int", "tmpTs", "=", "queued", ".", "getTimestamp", "(", ")", ";", "if", "(...
Write a slice of the queued items to the writer. @param slice set of queued data
[ "Write", "a", "slice", "of", "the", "queued", "items", "to", "the", "writer", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/stream/consumer/SlicedFileConsumer.java#L554-L577
107,968
Red5/red5-server-common
src/main/java/org/red5/server/stream/consumer/SlicedFileConsumer.java
SlicedFileConsumer.setupOutputPath
public void setupOutputPath(String name) { // get stream filename generator IStreamFilenameGenerator generator = (IStreamFilenameGenerator) ScopeUtils.getScopeService(scope, IStreamFilenameGenerator.class, DefaultStreamFilenameGenerator.class); // generate file path String filePath =...
java
public void setupOutputPath(String name) { // get stream filename generator IStreamFilenameGenerator generator = (IStreamFilenameGenerator) ScopeUtils.getScopeService(scope, IStreamFilenameGenerator.class, DefaultStreamFilenameGenerator.class); // generate file path String filePath =...
[ "public", "void", "setupOutputPath", "(", "String", "name", ")", "{", "// get stream filename generator\r", "IStreamFilenameGenerator", "generator", "=", "(", "IStreamFilenameGenerator", ")", "ScopeUtils", ".", "getScopeService", "(", "scope", ",", "IStreamFilenameGenerator...
Sets up the output file path for writing. @param name output filename to use
[ "Sets", "up", "the", "output", "file", "path", "for", "writing", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/stream/consumer/SlicedFileConsumer.java#L682-L701
107,969
Red5/red5-server-common
src/main/java/org/red5/server/stream/consumer/SlicedFileConsumer.java
SlicedFileConsumer.setVideoDecoderConfiguration
public void setVideoDecoderConfiguration(IRTMPEvent decoderConfig) { if (decoderConfig instanceof IStreamData) { IoBuffer data = ((IStreamData<?>) decoderConfig).getData().asReadOnlyBuffer(); videoConfigurationTag = ImmutableTag.build(decoderConfig.getDataType(), 0, data, 0); ...
java
public void setVideoDecoderConfiguration(IRTMPEvent decoderConfig) { if (decoderConfig instanceof IStreamData) { IoBuffer data = ((IStreamData<?>) decoderConfig).getData().asReadOnlyBuffer(); videoConfigurationTag = ImmutableTag.build(decoderConfig.getDataType(), 0, data, 0); ...
[ "public", "void", "setVideoDecoderConfiguration", "(", "IRTMPEvent", "decoderConfig", ")", "{", "if", "(", "decoderConfig", "instanceof", "IStreamData", ")", "{", "IoBuffer", "data", "=", "(", "(", "IStreamData", "<", "?", ">", ")", "decoderConfig", ")", ".", ...
Sets a video decoder configuration; some codecs require this, such as AVC. @param decoderConfig video codec configuration
[ "Sets", "a", "video", "decoder", "configuration", ";", "some", "codecs", "require", "this", "such", "as", "AVC", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/stream/consumer/SlicedFileConsumer.java#L709-L714
107,970
Red5/red5-server-common
src/main/java/org/red5/server/stream/consumer/SlicedFileConsumer.java
SlicedFileConsumer.setAudioDecoderConfiguration
public void setAudioDecoderConfiguration(IRTMPEvent decoderConfig) { if (decoderConfig instanceof IStreamData) { IoBuffer data = ((IStreamData<?>) decoderConfig).getData().asReadOnlyBuffer(); audioConfigurationTag = ImmutableTag.build(decoderConfig.getDataType(), 0, data, 0); ...
java
public void setAudioDecoderConfiguration(IRTMPEvent decoderConfig) { if (decoderConfig instanceof IStreamData) { IoBuffer data = ((IStreamData<?>) decoderConfig).getData().asReadOnlyBuffer(); audioConfigurationTag = ImmutableTag.build(decoderConfig.getDataType(), 0, data, 0); ...
[ "public", "void", "setAudioDecoderConfiguration", "(", "IRTMPEvent", "decoderConfig", ")", "{", "if", "(", "decoderConfig", "instanceof", "IStreamData", ")", "{", "IoBuffer", "data", "=", "(", "(", "IStreamData", "<", "?", ">", ")", "decoderConfig", ")", ".", ...
Sets a audio decoder configuration; some codecs require this, such as AAC. @param decoderConfig audio codec configuration
[ "Sets", "a", "audio", "decoder", "configuration", ";", "some", "codecs", "require", "this", "such", "as", "AAC", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/stream/consumer/SlicedFileConsumer.java#L722-L727
107,971
Red5/red5-server-common
src/main/java/org/red5/server/Client.java
Client.disconnect
public void disconnect() { if (disconnected.compareAndSet(false, true)) { log.debug("Disconnect - id: {}", id); if (connections != null && !connections.isEmpty()) { log.debug("Closing {} scope connections", connections.size()); // close all connection...
java
public void disconnect() { if (disconnected.compareAndSet(false, true)) { log.debug("Disconnect - id: {}", id); if (connections != null && !connections.isEmpty()) { log.debug("Closing {} scope connections", connections.size()); // close all connection...
[ "public", "void", "disconnect", "(", ")", "{", "if", "(", "disconnected", ".", "compareAndSet", "(", "false", ",", "true", ")", ")", "{", "log", ".", "debug", "(", "\"Disconnect - id: {}\"", ",", "id", ")", ";", "if", "(", "connections", "!=", "null", ...
Disconnects client from Red5 application
[ "Disconnects", "client", "from", "Red5", "application" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/Client.java#L139-L159
107,972
Red5/red5-server-common
src/main/java/org/red5/server/Client.java
Client.getConnections
public Set<IConnection> getConnections(IScope scope) { if (scope == null) { return getConnections(); } Set<IClient> scopeClients = scope.getClients(); if (scopeClients.contains(this)) { for (IClient cli : scopeClients) { if (this.equals(cli)...
java
public Set<IConnection> getConnections(IScope scope) { if (scope == null) { return getConnections(); } Set<IClient> scopeClients = scope.getClients(); if (scopeClients.contains(this)) { for (IClient cli : scopeClients) { if (this.equals(cli)...
[ "public", "Set", "<", "IConnection", ">", "getConnections", "(", "IScope", "scope", ")", "{", "if", "(", "scope", "==", "null", ")", "{", "return", "getConnections", "(", ")", ";", "}", "Set", "<", "IClient", ">", "scopeClients", "=", "scope", ".", "ge...
Return client connections to given scope @param scope Scope @return Set of connections for that scope
[ "Return", "client", "connections", "to", "given", "scope" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/Client.java#L177-L190
107,973
Red5/red5-server-common
src/main/java/org/red5/server/Client.java
Client.iterateScopeNameList
public List<String> iterateScopeNameList() { log.debug("iterateScopeNameList called"); Collection<IScope> scopes = getScopes(); log.debug("Scopes: {}", scopes.size()); List<String> scopeNames = new ArrayList<String>(scopes.size()); for (IScope scope : scopes) { ...
java
public List<String> iterateScopeNameList() { log.debug("iterateScopeNameList called"); Collection<IScope> scopes = getScopes(); log.debug("Scopes: {}", scopes.size()); List<String> scopeNames = new ArrayList<String>(scopes.size()); for (IScope scope : scopes) { ...
[ "public", "List", "<", "String", ">", "iterateScopeNameList", "(", ")", "{", "log", ".", "debug", "(", "\"iterateScopeNameList called\"", ")", ";", "Collection", "<", "IScope", ">", "scopes", "=", "getScopes", "(", ")", ";", "log", ".", "debug", "(", "\"Sc...
Iterate through the scopes and their attributes. Used by JMX @return list of scope attributes
[ "Iterate", "through", "the", "scopes", "and", "their", "attributes", ".", "Used", "by", "JMX" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/Client.java#L227-L242
107,974
Red5/red5-server-common
src/main/java/org/red5/server/Client.java
Client.register
protected void register(IConnection conn) { if (log.isDebugEnabled()) { if (conn == null) { log.debug("Register null connection, client id: {}", id); } else { log.debug("Register connection ({}:{}) client id: {}", conn.getRemoteAddress(), conn.getRemo...
java
protected void register(IConnection conn) { if (log.isDebugEnabled()) { if (conn == null) { log.debug("Register null connection, client id: {}", id); } else { log.debug("Register connection ({}:{}) client id: {}", conn.getRemoteAddress(), conn.getRemo...
[ "protected", "void", "register", "(", "IConnection", "conn", ")", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "if", "(", "conn", "==", "null", ")", "{", "log", ".", "debug", "(", "\"Register null connection, client id: {}\"", ",", "id...
Associate connection with client @param conn Connection object
[ "Associate", "connection", "with", "client" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/Client.java#L261-L280
107,975
Red5/red5-server-common
src/main/java/org/red5/server/Client.java
Client.unregister
protected void unregister(IConnection conn, boolean deleteIfNoConns) { log.debug("Unregister connection ({}:{}) client id: {}", conn.getRemoteAddress(), conn.getRemotePort(), id); // remove connection from connected scopes list connections.remove(conn); // If client is not connected ...
java
protected void unregister(IConnection conn, boolean deleteIfNoConns) { log.debug("Unregister connection ({}:{}) client id: {}", conn.getRemoteAddress(), conn.getRemotePort(), id); // remove connection from connected scopes list connections.remove(conn); // If client is not connected ...
[ "protected", "void", "unregister", "(", "IConnection", "conn", ",", "boolean", "deleteIfNoConns", ")", "{", "log", ".", "debug", "(", "\"Unregister connection ({}:{}) client id: {}\"", ",", "conn", ".", "getRemoteAddress", "(", ")", ",", "conn", ".", "getRemotePort"...
Removes client-connection association for given connection @param conn Connection object @param deleteIfNoConns Whether to delete this client if it no longer has any connections
[ "Removes", "client", "-", "connection", "association", "for", "given", "connection" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/Client.java#L300-L309
107,976
Red5/red5-server-common
src/main/java/org/red5/server/Client.java
Client.removeInstance
private void removeInstance() { // unregister client ClientRegistry ref = registry.get(); if (ref != null) { ref.removeClient(this); } else { log.warn("Client registry reference was not accessable, removal failed"); // TODO: attempt to lookup th...
java
private void removeInstance() { // unregister client ClientRegistry ref = registry.get(); if (ref != null) { ref.removeClient(this); } else { log.warn("Client registry reference was not accessable, removal failed"); // TODO: attempt to lookup th...
[ "private", "void", "removeInstance", "(", ")", "{", "// unregister client\r", "ClientRegistry", "ref", "=", "registry", ".", "get", "(", ")", ";", "if", "(", "ref", "!=", "null", ")", "{", "ref", ".", "removeClient", "(", "this", ")", ";", "}", "else", ...
Removes this instance from the client registry.
[ "Removes", "this", "instance", "from", "the", "client", "registry", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/Client.java#L386-L395
107,977
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.addChildScope
public boolean addChildScope(IBasicScope scope) { log.debug("Add child: {}", scope); boolean added = false; if (scope.isValid()) { try { if (!children.containsKey(scope)) { log.debug("Adding child scope: {} to {}", scope, this); ...
java
public boolean addChildScope(IBasicScope scope) { log.debug("Add child: {}", scope); boolean added = false; if (scope.isValid()) { try { if (!children.containsKey(scope)) { log.debug("Adding child scope: {} to {}", scope, this); ...
[ "public", "boolean", "addChildScope", "(", "IBasicScope", "scope", ")", "{", "log", ".", "debug", "(", "\"Add child: {}\"", ",", "scope", ")", ";", "boolean", "added", "=", "false", ";", "if", "(", "scope", ".", "isValid", "(", ")", ")", "{", "try", "{...
Add child scope to this scope @param scope Child scope @return true on success (if scope has handler and it accepts child scope addition), false otherwise
[ "Add", "child", "scope", "to", "this", "scope" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L194-L222
107,978
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.connect
public boolean connect(IConnection conn, Object[] params) { log.debug("Connect - scope: {} connection: {}", this, conn); if (enabled) { if (hasParent() && !parent.connect(conn, params)) { log.debug("Connection to parent failed"); return false; ...
java
public boolean connect(IConnection conn, Object[] params) { log.debug("Connect - scope: {} connection: {}", this, conn); if (enabled) { if (hasParent() && !parent.connect(conn, params)) { log.debug("Connection to parent failed"); return false; ...
[ "public", "boolean", "connect", "(", "IConnection", "conn", ",", "Object", "[", "]", "params", ")", "{", "log", ".", "debug", "(", "\"Connect - scope: {} connection: {}\"", ",", "this", ",", "conn", ")", ";", "if", "(", "enabled", ")", "{", "if", "(", "h...
Connect to scope with parameters. To successfully connect to scope it must have handler that will accept this connection with given set of parameters. Client associated with connection is added to scope clients set, connection is registered as scope event listener. @param conn Connection object @param params Parameter...
[ "Connect", "to", "scope", "with", "parameters", ".", "To", "successfully", "connect", "to", "scope", "it", "must", "have", "handler", "that", "will", "accept", "this", "connection", "with", "given", "set", "of", "parameters", ".", "Client", "associated", "with...
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L241-L287
107,979
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.createChildScope
public boolean createChildScope(String name) { // quick lookup by name log.debug("createChildScope: {}", name); if (children.hasName(name)) { log.debug("Scope: {} already exists, children: {}", name, children.getNames()); } else { return addChildScope(new Bu...
java
public boolean createChildScope(String name) { // quick lookup by name log.debug("createChildScope: {}", name); if (children.hasName(name)) { log.debug("Scope: {} already exists, children: {}", name, children.getNames()); } else { return addChildScope(new Bu...
[ "public", "boolean", "createChildScope", "(", "String", "name", ")", "{", "// quick lookup by name\r", "log", ".", "debug", "(", "\"createChildScope: {}\"", ",", "name", ")", ";", "if", "(", "children", ".", "hasName", "(", "name", ")", ")", "{", "log", ".",...
Create child scope of room type, with the given name. @param name child scope name @return true on success, false otherwise
[ "Create", "child", "scope", "of", "room", "type", "with", "the", "given", "name", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L295-L304
107,980
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.disconnect
public void disconnect(IConnection conn) { log.debug("Disconnect: {}", conn); // call disconnect handlers in reverse order of connection. ie. roomDisconnect is called before appDisconnect. final IClient client = conn.getClient(); if (client == null) { // early bail out ...
java
public void disconnect(IConnection conn) { log.debug("Disconnect: {}", conn); // call disconnect handlers in reverse order of connection. ie. roomDisconnect is called before appDisconnect. final IClient client = conn.getClient(); if (client == null) { // early bail out ...
[ "public", "void", "disconnect", "(", "IConnection", "conn", ")", "{", "log", ".", "debug", "(", "\"Disconnect: {}\"", ",", "conn", ")", ";", "// call disconnect handlers in reverse order of connection. ie. roomDisconnect is called before appDisconnect.\r", "final", "IClient", ...
Disconnect connection from scope @param conn Connection object
[ "Disconnect", "connection", "from", "scope" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L334-L377
107,981
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.getBroadcastScope
public IBroadcastScope getBroadcastScope(String name) { return (IBroadcastScope) children.getBasicScope(ScopeType.BROADCAST, name); }
java
public IBroadcastScope getBroadcastScope(String name) { return (IBroadcastScope) children.getBasicScope(ScopeType.BROADCAST, name); }
[ "public", "IBroadcastScope", "getBroadcastScope", "(", "String", "name", ")", "{", "return", "(", "IBroadcastScope", ")", "children", ".", "getBasicScope", "(", "ScopeType", ".", "BROADCAST", ",", "name", ")", ";", "}" ]
Return the broadcast scope for a given name @param name name @return broadcast scope or null if not found
[ "Return", "the", "broadcast", "scope", "for", "a", "given", "name" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L444-L446
107,982
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.getBasicScope
public IBasicScope getBasicScope(ScopeType type, String name) { return children.getBasicScope(type, name); }
java
public IBasicScope getBasicScope(ScopeType type, String name) { return children.getBasicScope(type, name); }
[ "public", "IBasicScope", "getBasicScope", "(", "ScopeType", "type", ",", "String", "name", ")", "{", "return", "children", ".", "getBasicScope", "(", "type", ",", "name", ")", ";", "}" ]
Return base scope of given type with given name @param type Scope type @param name Scope name @return Basic scope object
[ "Return", "base", "scope", "of", "given", "type", "with", "given", "name" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L455-L457
107,983
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.getBasicScopeNames
public Set<String> getBasicScopeNames(ScopeType type) { if (type != null) { Set<String> names = new HashSet<String>(); for (IBasicScope child : children.keySet()) { if (child.getType().equals(type)) { names.add(child.getName()); }...
java
public Set<String> getBasicScopeNames(ScopeType type) { if (type != null) { Set<String> names = new HashSet<String>(); for (IBasicScope child : children.keySet()) { if (child.getType().equals(type)) { names.add(child.getName()); }...
[ "public", "Set", "<", "String", ">", "getBasicScopeNames", "(", "ScopeType", "type", ")", "{", "if", "(", "type", "!=", "null", ")", "{", "Set", "<", "String", ">", "names", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "for", "(", "IBa...
Return basic scope names matching given type @param type Scope type @return set of scope names
[ "Return", "basic", "scope", "names", "matching", "given", "type" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L465-L476
107,984
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.getDepth
@Override public int getDepth() { if (depth == UNSET) { if (hasParent()) { depth = parent.getDepth() + 1; } else { depth = 0; } } return depth; }
java
@Override public int getDepth() { if (depth == UNSET) { if (hasParent()) { depth = parent.getDepth() + 1; } else { depth = 0; } } return depth; }
[ "@", "Override", "public", "int", "getDepth", "(", ")", "{", "if", "(", "depth", "==", "UNSET", ")", "{", "if", "(", "hasParent", "(", ")", ")", "{", "depth", "=", "parent", ".", "getDepth", "(", ")", "+", "1", ";", "}", "else", "{", "depth", "...
return scope depth @return Scope depth
[ "return", "scope", "depth" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L594-L604
107,985
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.getHandler
public IScopeHandler getHandler() { log.trace("getHandler from {}", name); if (handler != null) { return handler; } else if (hasParent()) { return getParent().getHandler(); } else { return null; } }
java
public IScopeHandler getHandler() { log.trace("getHandler from {}", name); if (handler != null) { return handler; } else if (hasParent()) { return getParent().getHandler(); } else { return null; } }
[ "public", "IScopeHandler", "getHandler", "(", ")", "{", "log", ".", "trace", "(", "\"getHandler from {}\"", ",", "name", ")", ";", "if", "(", "handler", "!=", "null", ")", "{", "return", "handler", ";", "}", "else", "if", "(", "hasParent", "(", ")", ")...
Return scope handler or parent's scope handler if this scope doesn't have one. @return Scope handler (or parent's one)
[ "Return", "scope", "handler", "or", "parent", "s", "scope", "handler", "if", "this", "scope", "doesn", "t", "have", "one", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L611-L620
107,986
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.getResource
public Resource getResource(String path) { if (hasContext()) { return context.getResource(path); } return getContext().getResource(getContextPath() + '/' + path); }
java
public Resource getResource(String path) { if (hasContext()) { return context.getResource(path); } return getContext().getResource(getContextPath() + '/' + path); }
[ "public", "Resource", "getResource", "(", "String", "path", ")", "{", "if", "(", "hasContext", "(", ")", ")", "{", "return", "context", ".", "getResource", "(", "path", ")", ";", "}", "return", "getContext", "(", ")", ".", "getResource", "(", "getContext...
Return resource located at given path @param path Resource path @return Resource
[ "Return", "resource", "located", "at", "given", "path" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L667-L672
107,987
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.getResources
public Resource[] getResources(String path) throws IOException { if (hasContext()) { return context.getResources(path); } return getContext().getResources(getContextPath() + '/' + path); }
java
public Resource[] getResources(String path) throws IOException { if (hasContext()) { return context.getResources(path); } return getContext().getResources(getContextPath() + '/' + path); }
[ "public", "Resource", "[", "]", "getResources", "(", "String", "path", ")", "throws", "IOException", "{", "if", "(", "hasContext", "(", ")", ")", "{", "return", "context", ".", "getResources", "(", "path", ")", ";", "}", "return", "getContext", "(", ")",...
Return array of resources from path string, usually used with pattern path @param path Resources path @return Resources @throws IOException I/O exception
[ "Return", "array", "of", "resources", "from", "path", "string", "usually", "used", "with", "pattern", "path" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L681-L686
107,988
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.getScope
public IScope getScope(String name) { IBasicScope child = children.getBasicScope(ScopeType.UNDEFINED, name); log.debug("Child of {}: {}", this.name, child); if (child != null) { if (child instanceof IScope) { return (IScope) child; } log...
java
public IScope getScope(String name) { IBasicScope child = children.getBasicScope(ScopeType.UNDEFINED, name); log.debug("Child of {}: {}", this.name, child); if (child != null) { if (child instanceof IScope) { return (IScope) child; } log...
[ "public", "IScope", "getScope", "(", "String", "name", ")", "{", "IBasicScope", "child", "=", "children", ".", "getBasicScope", "(", "ScopeType", ".", "UNDEFINED", ",", "name", ")", ";", "log", ".", "debug", "(", "\"Child of {}: {}\"", ",", "this", ".", "n...
Return child scope by name @param name Scope name @return Child scope with given name
[ "Return", "child", "scope", "by", "name" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L694-L704
107,989
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.getServiceHandler
public Object getServiceHandler(String name) { Map<String, Object> serviceHandlers = getServiceHandlers(false); if (serviceHandlers == null) { return null; } return serviceHandlers.get(name); }
java
public Object getServiceHandler(String name) { Map<String, Object> serviceHandlers = getServiceHandlers(false); if (serviceHandlers == null) { return null; } return serviceHandlers.get(name); }
[ "public", "Object", "getServiceHandler", "(", "String", "name", ")", "{", "Map", "<", "String", ",", "Object", ">", "serviceHandlers", "=", "getServiceHandlers", "(", "false", ")", ";", "if", "(", "serviceHandlers", "==", "null", ")", "{", "return", "null", ...
Return service handler by name @param name Handler name @return Service handler with given name
[ "Return", "service", "handler", "by", "name" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L722-L728
107,990
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.getServiceHandlerNames
@SuppressWarnings("unchecked") public Set<String> getServiceHandlerNames() { Map<String, Object> serviceHandlers = getServiceHandlers(false); if (serviceHandlers == null) { return Collections.EMPTY_SET; } return serviceHandlers.keySet(); }
java
@SuppressWarnings("unchecked") public Set<String> getServiceHandlerNames() { Map<String, Object> serviceHandlers = getServiceHandlers(false); if (serviceHandlers == null) { return Collections.EMPTY_SET; } return serviceHandlers.keySet(); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Set", "<", "String", ">", "getServiceHandlerNames", "(", ")", "{", "Map", "<", "String", ",", "Object", ">", "serviceHandlers", "=", "getServiceHandlers", "(", "false", ")", ";", "if", "(", "serv...
Return set of service handler names. Removing entries from the set unregisters the corresponding service handler. @return Set of service handler names
[ "Return", "set", "of", "service", "handler", "names", ".", "Removing", "entries", "from", "the", "set", "unregisters", "the", "corresponding", "service", "handler", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L735-L742
107,991
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.getServiceHandlers
protected Map<String, Object> getServiceHandlers(boolean allowCreate) { if (serviceHandlers == null) { if (allowCreate) { serviceHandlers = new ConcurrentHashMap<String, Object>(3, 0.9f, 1); } } return serviceHandlers; }
java
protected Map<String, Object> getServiceHandlers(boolean allowCreate) { if (serviceHandlers == null) { if (allowCreate) { serviceHandlers = new ConcurrentHashMap<String, Object>(3, 0.9f, 1); } } return serviceHandlers; }
[ "protected", "Map", "<", "String", ",", "Object", ">", "getServiceHandlers", "(", "boolean", "allowCreate", ")", "{", "if", "(", "serviceHandlers", "==", "null", ")", "{", "if", "(", "allowCreate", ")", "{", "serviceHandlers", "=", "new", "ConcurrentHashMap", ...
Return map of service handlers and optionally created it if it doesn't exist. @param allowCreate Should the map be created if it doesn't exist? @return Map of service handlers
[ "Return", "map", "of", "service", "handlers", "and", "optionally", "created", "it", "if", "it", "doesn", "t", "exist", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L759-L766
107,992
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.hasChildScope
public boolean hasChildScope(ScopeType type, String name) { log.debug("Has child scope? {} in {}", name, this); return children.getBasicScope(type, name) != null; }
java
public boolean hasChildScope(ScopeType type, String name) { log.debug("Has child scope? {} in {}", name, this); return children.getBasicScope(type, name) != null; }
[ "public", "boolean", "hasChildScope", "(", "ScopeType", "type", ",", "String", "name", ")", "{", "log", ".", "debug", "(", "\"Has child scope? {} in {}\"", ",", "name", ",", "this", ")", ";", "return", "children", ".", "getBasicScope", "(", "type", ",", "nam...
Check whether scope has child scope with given name and type @param type Child scope type @param name Child scope name @return true if scope has child node with given name and type, false otherwise
[ "Check", "whether", "scope", "has", "child", "scope", "with", "given", "name", "and", "type" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L818-L821
107,993
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.init
public void init() { log.debug("Init scope: {} parent: {}", name, parent); if (hasParent()) { if (!parent.hasChildScope(name)) { if (parent.addChildScope(this)) { log.debug("Scope added to parent"); } else { log.w...
java
public void init() { log.debug("Init scope: {} parent: {}", name, parent); if (hasParent()) { if (!parent.hasChildScope(name)) { if (parent.addChildScope(this)) { log.debug("Scope added to parent"); } else { log.w...
[ "public", "void", "init", "(", ")", "{", "log", ".", "debug", "(", "\"Init scope: {} parent: {}\"", ",", "name", ",", "parent", ")", ";", "if", "(", "hasParent", "(", ")", ")", "{", "if", "(", "!", "parent", ".", "hasChildScope", "(", "name", ")", ")...
Initialization actions, start if autostart is set to true.
[ "Initialization", "actions", "start", "if", "autostart", "is", "set", "to", "true", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L854-L874
107,994
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.uninit
public void uninit() { log.debug("Un-init scope"); for (IBasicScope child : children.keySet()) { if (child instanceof Scope) { ((Scope) child).uninit(); } } stop(); setEnabled(false); if (hasParent()) { if (par...
java
public void uninit() { log.debug("Un-init scope"); for (IBasicScope child : children.keySet()) { if (child instanceof Scope) { ((Scope) child).uninit(); } } stop(); setEnabled(false); if (hasParent()) { if (par...
[ "public", "void", "uninit", "(", ")", "{", "log", ".", "debug", "(", "\"Un-init scope\"", ")", ";", "for", "(", "IBasicScope", "child", ":", "children", ".", "keySet", "(", ")", ")", "{", "if", "(", "child", "instanceof", "Scope", ")", "{", "(", "(",...
Uninitialize scope and unregister from parent.
[ "Uninitialize", "scope", "and", "unregister", "from", "parent", "." ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L879-L893
107,995
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.registerServiceHandler
public void registerServiceHandler(String name, Object handler) { Map<String, Object> serviceHandlers = getServiceHandlers(); serviceHandlers.put(name, handler); }
java
public void registerServiceHandler(String name, Object handler) { Map<String, Object> serviceHandlers = getServiceHandlers(); serviceHandlers.put(name, handler); }
[ "public", "void", "registerServiceHandler", "(", "String", "name", ",", "Object", "handler", ")", "{", "Map", "<", "String", ",", "Object", ">", "serviceHandlers", "=", "getServiceHandlers", "(", ")", ";", "serviceHandlers", ".", "put", "(", "name", ",", "ha...
Register service handler by name @param name Service handler name @param handler Service handler
[ "Register", "service", "handler", "by", "name" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L933-L936
107,996
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.removeChildScope
public void removeChildScope(IBasicScope scope) { log.debug("removeChildScope: {}", scope); if (children.containsKey(scope)) { // remove from parent children.remove(scope); if (scope instanceof Scope) { unregisterJMX(); } } ...
java
public void removeChildScope(IBasicScope scope) { log.debug("removeChildScope: {}", scope); if (children.containsKey(scope)) { // remove from parent children.remove(scope); if (scope instanceof Scope) { unregisterJMX(); } } ...
[ "public", "void", "removeChildScope", "(", "IBasicScope", "scope", ")", "{", "log", ".", "debug", "(", "\"removeChildScope: {}\"", ",", "scope", ")", ";", "if", "(", "children", ".", "containsKey", "(", "scope", ")", ")", "{", "// remove from parent\r", "child...
Removes child scope @param scope Child scope to remove
[ "Removes", "child", "scope" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L943-L952
107,997
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.removeChildren
public void removeChildren() { log.trace("removeChildren of {}", name); for (IBasicScope child : children.keySet()) { removeChildScope(child); } }
java
public void removeChildren() { log.trace("removeChildren of {}", name); for (IBasicScope child : children.keySet()) { removeChildScope(child); } }
[ "public", "void", "removeChildren", "(", ")", "{", "log", ".", "trace", "(", "\"removeChildren of {}\"", ",", "name", ")", ";", "for", "(", "IBasicScope", "child", ":", "children", ".", "keySet", "(", ")", ")", "{", "removeChildScope", "(", "child", ")", ...
Removes all the child scopes
[ "Removes", "all", "the", "child", "scopes" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L957-L962
107,998
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.setHandler
public void setHandler(IScopeHandler handler) { log.debug("setHandler: {} on {}", handler, name); this.handler = handler; if (handler instanceof IScopeAware) { ((IScopeAware) handler).setScope(this); } }
java
public void setHandler(IScopeHandler handler) { log.debug("setHandler: {} on {}", handler, name); this.handler = handler; if (handler instanceof IScopeAware) { ((IScopeAware) handler).setScope(this); } }
[ "public", "void", "setHandler", "(", "IScopeHandler", "handler", ")", "{", "log", ".", "debug", "(", "\"setHandler: {} on {}\"", ",", "handler", ",", "name", ")", ";", "this", ".", "handler", "=", "handler", ";", "if", "(", "handler", "instanceof", "IScopeAw...
Setter for scope event handler @param handler Event handler
[ "Setter", "for", "scope", "event", "handler" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L1016-L1022
107,999
Red5/red5-server-common
src/main/java/org/red5/server/scope/Scope.java
Scope.setName
@Override public final void setName(String name) { log.debug("Set name: {}", name); if (this.name == null && StringUtils.isNotBlank(name)) { // reset of the name is no longer allowed this.name = name; // unregister from jmx if (oName != null) { ...
java
@Override public final void setName(String name) { log.debug("Set name: {}", name); if (this.name == null && StringUtils.isNotBlank(name)) { // reset of the name is no longer allowed this.name = name; // unregister from jmx if (oName != null) { ...
[ "@", "Override", "public", "final", "void", "setName", "(", "String", "name", ")", "{", "log", ".", "debug", "(", "\"Set name: {}\"", ",", "name", ")", ";", "if", "(", "this", ".", "name", "==", "null", "&&", "StringUtils", ".", "isNotBlank", "(", "nam...
Setter for scope name @param name Scope name
[ "Setter", "for", "scope", "name" ]
39ae73710c25bda86d70b13ef37ae707962217b9
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/scope/Scope.java#L1030-L1045